Skip to content

Command Alias #91

Open

Description

@PenguinBoi12

Commands can currently only be invoked by their exact name. Bot authors often want a command to respond to multiple names (e.g. !hello and !hi) without duplicating logic so we would like to allow registering one or more aliases for a command at decoration time.

Proposed API

@bot.command(aliases=["hi", "hey"])
async def greet(ctx, name: str):
    await ctx.reply(f"Hello {name}!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions