From 4d3619d856ccbad98c87a5463cc64583f2f84ddd Mon Sep 17 00:00:00 2001 From: "Christopher T. Herrera" Date: Fri, 4 Sep 2015 12:13:58 -0400 Subject: [PATCH] closes #17 adding response to SetWebhook Method --- methods.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/methods.go b/methods.go index 40b82e2..816aebc 100644 --- a/methods.go +++ b/methods.go @@ -880,13 +880,11 @@ func (bot *BotAPI) GetUpdates(config UpdateConfig) ([]Update, error) { // If this is set, GetUpdates will not get any data! // // Requires Url OR to set Clear to true. -func (bot *BotAPI) SetWebhook(config WebhookConfig) error { +func (bot *BotAPI) SetWebhook(config WebhookConfig) (APIResponse, error){ v := url.Values{} if !config.Clear { v.Add("url", config.URL.String()) } - _, err := bot.MakeRequest("setWebhook", v) - - return err + return bot.MakeRequest("setWebhook", v) }