fix: rename !help to !list-commands to avoid collision with built-in help
- discord.ext.commands provides a built-in 'help' command - Renamed the custom command from 'help' to 'list-commands' - Now users can type !list-commands to see all available commands
This commit is contained in:
parent
778778c622
commit
00cdad3145
2
main.py
2
main.py
@ -139,7 +139,7 @@ async def hello_command(ctx: commands.Context, name: str = "World") -> None:
|
|||||||
"""Say hello to someone."""
|
"""Say hello to someone."""
|
||||||
await ctx.send(f"Hello, {name}!")
|
await ctx.send(f"Hello, {name}!")
|
||||||
|
|
||||||
@bot.command(name="help", description="List all available commands.")
|
@bot.command(name="list-commands", description="List all available commands.")
|
||||||
async def help_command(ctx: commands.Context) -> None:
|
async def help_command(ctx: commands.Context) -> None:
|
||||||
"""List all available commands."""
|
"""List all available commands."""
|
||||||
# Get all registered commands (both prefix and slash)
|
# Get all registered commands (both prefix and slash)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user