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

@ -723,6 +723,15 @@ func NewInlineKeyboardButtonWebApp(text string, webapp WebAppInfo) InlineKeyboar
}
}
// NewInlineKeyboardButtonSwitchInlineQueryChoosenChat creates an inline keyboard button with text
// which goes to a SwitchInlineQueryChosenChat.
func NewInlineKeyboardButtonSwitchInlineQueryChoosenChat(text string, switchInlineQueryChosenChat SwitchInlineQueryChosenChat) InlineKeyboardButton {
return InlineKeyboardButton{
Text: text,
SwitchInlineQueryChosenChat: &switchInlineQueryChosenChat,
}
}
// NewInlineKeyboardButtonLoginURL creates an inline keyboard button with text
// which goes to a LoginURL.
func NewInlineKeyboardButtonLoginURL(text string, loginURL LoginURL) InlineKeyboardButton {
@ -961,6 +970,21 @@ func NewGetMyShortDescription(languageCode string) GetMyShortDescriptionConfig {
}
}
// NewGetMyName get the current bot name for the given user language
func NewGetMyName(languageCode string) GetMyNameConfig {
return GetMyNameConfig{
LanguageCode: languageCode,
}
}
// NewSetMyName change the bot's name
func NewSetMyName(languageCode, name string) SetMyNameConfig {
return SetMyNameConfig{
Name: name,
LanguageCode: languageCode,
}
}
// NewGetMyCommandsWithScope allows you to set the registered commands for a
// given scope.
func NewGetMyCommandsWithScope(scope BotCommandScope) GetMyCommandsConfig {