You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
telebot/telebot.go

17 lines
325 B
Go

// Package telebot provides a handy wrapper for interactions
// with Telegram bots.
package telebot
// Attempts to construct a Bot with `token` given.
func Create(token string) (Bot, error) {
user, err := api_getMe(token)
if err != nil {
return Bot{}, err
}
return Bot{
Token: token,
Identity: user,
}, nil
}