【发布时间】:2021-03-23 15:22:20
【问题描述】:
我只是在尝试制作 Discord 机器人,并尝试将此命令放在一个类别中,但是,无论我如何称呼该命令,都会出现此错误。 这是我的代码:
import discord,random
from discord.ext import commands
bot = commands.Bot(command_prefix=';')
@bot.event
async def on_ready():
print("bot is ready for stuff")
await bot.change_presence(activity=discord.Game(name=";help"))
class general_stuff(commands.Cog):
"""Stuff that's not important to the bot per say"""
@bot.command()
async def lkibashfjiabfiapbfaipb(self, message):
await message.send("test received.")
bot.add_cog(general_stuff())
bot.run("TOKEN")
这是我返回的错误:
The command lkibashfjiabfiapbfaipb is already an existing command or alias.
无论我如何更改命令,它总是给出同样的错误。
【问题讨论】:
标签: python discord discord.py