Skip to content

Change the API for hiding commands #19

@pietroalbini

Description

@pietroalbini

Based on some feedback received by an user, the API for hiding commands from /help is not that great. Currently you need to define a normal command and then append the name of the command to the bot.hide_commands list. This works, but it would be nicer to hide the command directly from its declaration, like so:

@bot.command("hello", hidden=True)
def hello_command(chat, message, args):
    pass

Current way:

@bot.command("hello")
def hello_command(chat, message, args):
    pass

bot.hide_commands.append("hello")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions