1
0
telegram/new_bot.go
2017-10-05 18:22:16 +05:00

14 lines
228 B
Go

package telegram
type Bot struct {
AccessToken string
Self *User
}
func NewBot(accessToken string) (*Bot, error) {
var err error
bot := &Bot{AccessToken: accessToken}
bot.Self, err = bot.GetMe()
return bot, err
}