Answer the question
In order to leave comments, you need to log in
What to do if the bot does not start?
What should I do, I start the bot and it gives an error
code
import discord
from discord.ext import commands
from config import settings
bot = commands.Bot(command_prefix = settings['prefix'])
@bot.command() # Не передаём аргумент pass_context, так как он был нужен в старых версиях.
async def help(ctx):
embed=discord.Embed(title="HELP MOD", description="Помощь новым модератором", color=0xff0000)
embed.add_field(name="ban ", value="забанить", inline=True)
embed.add_field(name="mute", value="замутить", inline=True)
embed.add_field(name="kick", value="выгнать", inline=True)
embed.add_field(name="vmute", value="замутить в голосовом канале", inline=False)
embed.set_footer(text=" {member.name} ")
await ctx.send(embed=embed)
@bot.event
async def on_ready():
print('Logged in as:\n{0.user.name}\n{0.user.id}'.format(bot))
bot.run(settings['token'])
Traceback (most recent call last):
File "C:\Users\79082\Desktop\bot-discord-js-py\bot\bot.py", line 9, in <module>
async def help(ctx):
File "C:\Python39\lib\site-packages\discord\ext\commands\core.py", line 1263, in decorator
self.add_command(result)
File "C:\Python39\lib\site-packages\discord\ext\commands\core.py", line 1149, in add_command
raise CommandRegistrationError(command.name)
discord.ext.commands.errors.CommandRegistrationError: The command help is already an existing command or alias.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question