BOT API 6.7 implementation

This commit is contained in:
stdkhai 2023-07-05 11:23:14 +03:00
parent c33a1d7c56
commit 7d82083b03
5 changed files with 150 additions and 13 deletions

View file

@ -178,6 +178,25 @@ func TestNewInlineKeyboardButtonLoginURL(t *testing.T) {
}
}
func TestNewInlineKeyboardButtonSwitchInlineQueryChoosenChat(t *testing.T) {
result := NewInlineKeyboardButtonSwitchInlineQueryChoosenChat("text", SwitchInlineQueryChosenChat{
Query: "query",
AllowUserChats: false,
AllowBotChats: false,
AllowGroupChats: false,
AllowChannelChats: false,
})
if result.Text != "text" ||
result.SwitchInlineQueryChosenChat.Query != "query" ||
result.SwitchInlineQueryChosenChat.AllowUserChats != false ||
result.SwitchInlineQueryChosenChat.AllowBotChats != false ||
result.SwitchInlineQueryChosenChat.AllowGroupChats != false ||
result.SwitchInlineQueryChosenChat.AllowChannelChats != false {
t.Fail()
}
}
func TestNewEditMessageText(t *testing.T) {
edit := NewEditMessageText(ChatID, ReplyToMessageID, "new text")