Skip to content

Conversation

@PenguinBoi12
Copy link
Contributor

@PenguinBoi12 PenguinBoi12 commented Aug 18, 2025

This PR add command groups, a way to organize related commands under a common namespace. Various important changes have been brought to the core Bot, Command and Context class.

Example

Instance group commands

@bot.group()
async def math(ctx):
    pass

@math.command()
def add(ctx, a, b):
    ctx.reply(f"{a} + {b} = {a + b}"}

@math.command()
def subtract(ctx, a, b):
    ctx.reply(f"{a} - {b} = {a - b}"}

Usage:

!math add 2 5
2 + 5 = 7

!math subtract 2 5
2 - 5 = -3

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