|
|
|
@ -9,7 +9,7 @@ type BotAPI struct { |
|
|
|
|
Debug bool `json:"debug"` |
|
|
|
|
Self User `json:"-"` |
|
|
|
|
Updates chan Update `json:"-"` |
|
|
|
|
Client http.Client `json:"-"` |
|
|
|
|
Client *http.Client `json:"-"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// NewBotAPI creates a new BotAPI instance.
|
|
|
|
@ -21,7 +21,7 @@ func NewBotAPI(token string, client *http.Client) (*BotAPI, error) { |
|
|
|
|
|
|
|
|
|
bot := &BotAPI{ |
|
|
|
|
Token: token, |
|
|
|
|
Client: *client, |
|
|
|
|
Client: client, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
self, err := bot.GetMe() |
|
|
|
|