fix debug printing
parent
3cfc52c9c2
commit
6b5102fab5
5
bot.go
5
bot.go
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue