Few bug fixes
This commit is contained in:
parent
612584dbd3
commit
8249dd6a93
2 changed files with 3 additions and 3 deletions
4
bot.go
4
bot.go
|
@ -14,14 +14,14 @@ type BotAPI struct {
|
|||
|
||||
// NewBotAPI creates a new BotAPI instance.
|
||||
// Requires a token, provided by @BotFather on Telegram
|
||||
func NewBotAPI(token string, client http.Client) (*BotAPI, error) {
|
||||
func NewBotAPI(token string, client *http.Client) (*BotAPI, error) {
|
||||
if client == nil {
|
||||
client = &http.Client{}
|
||||
}
|
||||
|
||||
bot := &BotAPI{
|
||||
Token: token,
|
||||
Client: client,
|
||||
Client: *client,
|
||||
}
|
||||
|
||||
self, err := bot.GetMe()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue