1
0
telegram/new_bot.go
2018-01-29 14:52:33 +05:00

15 lines
229 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
}