new method set_bot_commands by jonatan1609 · Pull Request #657 · pyrogram/pyrogram · GitHub
Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

new method set_bot_commands - #657

Merged
delivrance merged 12 commits into
pyrogram:masterfrom
jonatan1609:set_bot_commands
May 11, 2021
Merged

delivrance merged 12 commits into
pyrogram:masterfrom
jonatan1609:set_bot_commands

Conversation

@jonatan1609

@jonatan1609 jonatan1609 commented Mar 31, 2021

Copy link
Copy Markdown
Contributor
app.set_bot_commands(
    [
         pyrogram.types.BotCommand("start", "start the bot"),
         pyrogram.types.BotCommand("stop", "stop the bot")
    ]
)

in order to remove all commands, we can pass [] or None.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we need this. We can simply pass/return List[BotCommand].

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think I've done that.

@jonatan1609

Copy link
Copy Markdown
Contributor Author

I fixed a SyntaxError, thanks to Github Actions 😆

Comment thread pyrogram/methods/bots/set_bot_commands.py Outdated
@delivrance

Copy link
Copy Markdown
Member

@delivrance
delivrance merged commit 293e852 into pyrogram:master May 11, 2021
@jonatan1609
jonatan1609 deleted the set_bot_commands branch May 11, 2021 10:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants