discord.ext.commands.errors.MissingRequiredArgument: ctx is a required argument that is missing
@bot.command(name="ping")
async def ping(self, ctx):
await ctx.channel.send(f"{bot.latency}")
что не так? Если я напишу client вместо bot мне вылетит ошибка
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'client' is not defined
а если я впишу bot -
discord.ext.commands.errors.MissingRequiredArgument: ctx is a required argument that is missing.
Ответы (1 шт):
Автор решения: Z1uka
→ Ссылка
во-первых @bot.command() пишем без отступов, во-вторых зачем тебе аргумент self? ты можешь оставить только ctx и также можно убрать команду channel и оставить ctx.send()