fix debug printing

bot-api-6.1
zhuharev 2017-10-31 02:34:34 +03:00
parent 3cfc52c9c2
commit 6b5102fab5
No known key found for this signature in database
GPG Key ID: 4B21EFB85BF9CBF5
1 changed files with 3 additions and 2 deletions

5
bot.go
View File

@ -73,8 +73,9 @@ func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse,
if err != nil {
return apiResp, err
}
if bot.Debug {
log.Printf("%s %s", endpoint, bytes)
log.Printf("%s resp: %s", endpoint, bytes)
}
if resp.StatusCode == http.StatusForbidden {
@ -110,7 +111,7 @@ func (bot *BotAPI) decodeAPIResponse(responseBody io.Reader, resp *APIResponse)
return
}
return
return data, nil
}
// makeMessageRequest makes a request to a method that returns a Message.