我需要
help
命令有自己的前缀。
例如,机器人的标准前缀是
!
,对于 help
命令,我想使用前缀 .
。除了 brige 命令之外,我在文档中没有找到任何内容,但这不是我需要的。
我的代码:
import discord
intents = discord.Intents.all()
bot = commands.Bot(command_prefix="!", intents=intents, help_command=None)
@bot.command()
async def help(ctx):
#long embed
await ctx.send(embed=embed, view=view)
bot.run(token)
只需将命令前缀从
!
更改为 .
,如下所示:
import discord
intents = discord.Intents.all()
bot = commands.Bot(command_prefix=".", intents=intents, help_command=None)
@bot.command()
async def help(ctx):
#long embed
await ctx.send(embed=embed, view=view)
bot.run(token)