Additional changes for Telegram API updates.

This commit is contained in:
Syfaro 2016-11-24 23:50:35 -06:00
parent f3a33ae6f1
commit 0a57807db7
5 changed files with 82 additions and 13 deletions

View file

@ -1,6 +1,7 @@
package tgbotapi
import (
"log"
"net/url"
)
@ -20,6 +21,7 @@ func NewMessage(chatID int64, text string) MessageConfig {
// NewMessageToChannel creates a new Message that is sent to a channel
// by username.
//
// username is the username of the channel, text is the message text.
func NewMessageToChannel(username string, text string) MessageConfig {
return MessageConfig{
@ -479,12 +481,23 @@ func NewEditMessageReplyMarkup(chatID int64, messageID int, replyMarkup InlineKe
// NewHideKeyboard hides the keyboard, with the option for being selective
// or hiding for everyone.
func NewHideKeyboard(selective bool) ReplyKeyboardHide {
log.Println("NewHideKeyboard is deprecated, please use NewRemoveKeyboard")
return ReplyKeyboardHide{
HideKeyboard: true,
Selective: selective,
}
}
// NewRemoveKeyboard hides the keyboard, with the option for being selective
// or hiding for everyone.
func NewRemoveKeyboard(selective bool) ReplyKeyboardRemove {
return ReplyKeyboardRemove{
RemoveKeyboard: true,
Selective: selective,
}
}
// NewKeyboardButton creates a regular keyboard button.
func NewKeyboardButton(text string) KeyboardButton {
return KeyboardButton{