Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: implement 6.7 features #654

Closed
wants to merge 3 commits into from
Closed

Conversation

Nash-Well
Copy link
Contributor

No description provided.

@demget demget added this to the v3.3 milestone Feb 23, 2024
bot.go Outdated
}

// SetBotName change's the bot name.
func (b *Bot) SetBotName(name, lc string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (b *Bot) SetBotName(name, lc string) error {
func (b *Bot) SetMyName(name, lc string) error {

bot.go Outdated
}

// BotName returns the current bot name for the given user language.
func (b *Bot) BotName(lc string) (*BotInfo, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (b *Bot) BotName(lc string) (*BotInfo, error) {
func (b *Bot) MyName(lc string) (*BotInfo, error) {

inline.go Outdated
Comment on lines 56 to 63
// (Optional) If passed, clients will display a button with specified
// text that switches the user to a private chat with the bot and sends
// the bot a start message with the parameter switch_pm_parameter.
SwitchPMText string `json:"switch_pm_text,omitempty"`

// (Optional) Parameter for the start message sent to the bot when user
// presses the switch button.
SwitchPMParameter string `json:"switch_pm_parameter,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the fields.

inline.go Outdated

// InlineQueryChosenChat represents an inline button that switches the current
// user to inline mode in a chosen chat, with an optional default inline query.
type InlineQueryChosenChat struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Add the respective field to the InlineButton

    type InlineButton struct {

  2. Rename to SwitchInlineQuery

markup.go Outdated
Data string `json:"callback_data,omitempty"`
InlineQuery string `json:"switch_inline_query,omitempty"`
InlineQueryChat string `json:"switch_inline_query_current_chat"`
InlineQueryChosenChat *InlineQueryChosenChat `json:"switch_inline_query_chosen_chat"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InlineQueryChosenChat *InlineQueryChosenChat `json:"switch_inline_query_chosen_chat"`
InlineQueryChosenChat *InlineQueryChosenChat `json:"switch_inline_query_chosen_chat,omitempty"`

@demget demget closed this Feb 25, 2024
@demget demget reopened this Feb 26, 2024
@Nash-Well Nash-Well closed this Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants