From f8cc0d2aaa9960287f9eddc1f393bff3fbf7181e Mon Sep 17 00:00:00 2001 From: Gleb Sinyavsky Date: Wed, 16 Dec 2015 11:38:39 +0300 Subject: [PATCH] Bot::QuickSend removed --- README.md | 2 -- bot.go | 6 ------ bot_test.go | 10 ---------- 3 files changed, 18 deletions(-) diff --git a/README.md b/README.md index d3a3377..4e9c06a 100644 --- a/README.md +++ b/README.md @@ -85,8 +85,6 @@ func main() { } ``` -For quickly send text message you can use BotAPI method `QuickSend(chatID, "your message")` - If you need, you may generate a self signed certficate, as this requires HTTPS / TLS. The above example tells Telegram that this is your certificate and that it should be trusted, even though it is not properly signed. openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3560 -subj "//O=Org\CN=Test" -nodes diff --git a/bot.go b/bot.go index 586e2c7..73f5ba1 100644 --- a/bot.go +++ b/bot.go @@ -220,12 +220,6 @@ func (bot *BotAPI) Send(c Chattable) (Message, error) { } } -// QuickSend will send message to selected chat -func (bot *BotAPI) QuickSend(chatID int, message string) (Message, error) { - msg := NewMessage(chatID, message) - return bot.Send(msg) -} - func (bot *BotAPI) debugLog(context string, v url.Values, message interface{}) { if bot.Debug { log.Printf("%s req : %+v\n", context, v) diff --git a/bot_test.go b/bot_test.go index 25bb6b8..cd9cdcf 100644 --- a/bot_test.go +++ b/bot_test.go @@ -342,16 +342,6 @@ func TestSendChatConfig(t *testing.T) { } } -func TestQuickSend(t *testing.T) { - bot, _ := getBot(t) - - _, err := bot.QuickSend(ChatID, "test message") - - if err != nil { - t.Fail() - } -} - func TestGetUserProfilePhotos(t *testing.T) { bot, _ := getBot(t)