Compare commits
No commits in common. "00cdad31457da68a864b4505ea4116e22fcafbea" and "331e0e10a7d5b7305cfe6831e1d0e1d6a9f8e69d" have entirely different histories.
00cdad3145
...
331e0e10a7
6
main.py
6
main.py
@ -139,7 +139,7 @@ async def hello_command(ctx: commands.Context, name: str = "World") -> None:
|
||||
"""Say hello to someone."""
|
||||
await ctx.send(f"Hello, {name}!")
|
||||
|
||||
@bot.command(name="list-commands", description="List all available commands.")
|
||||
@bot.command(name="help", description="List all available commands.")
|
||||
async def help_command(ctx: commands.Context) -> None:
|
||||
"""List all available commands."""
|
||||
# Get all registered commands (both prefix and slash)
|
||||
@ -147,7 +147,7 @@ async def help_command(ctx: commands.Context) -> None:
|
||||
cmd_list = []
|
||||
for cmd in cmds:
|
||||
cmd_list.append(f" `{cmd.name}` — {cmd.description}")
|
||||
|
||||
|
||||
await ctx.send(
|
||||
f"**{bot.user.name} — Command List**\n\n"
|
||||
+ "\n".join(cmd_list)
|
||||
@ -205,7 +205,7 @@ async def on_message(message: discord.Message) -> None:
|
||||
if message.author == bot.user:
|
||||
return
|
||||
|
||||
# Ignore messages in DMs
|
||||
# Check if the message is in a guild (server)
|
||||
if message.guild is None:
|
||||
return
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user