Answer the question
In order to leave comments, you need to log in
Why doesn't the python discord bot start?
I made a simple python bot for discord (I took everything from this article https://habr.com/en/post/494600/ ).
The code:
import discord
from discord.ext import commands
TOKEN = 'токен'
bot = commands.Bot(command_prefix='!') #инициализируем бота с префиксом '!'
@bot.command(pass_context=True) #разрешаем передавать агрументы
async def test(ctx, arg): #создаем асинхронную фунцию бота
await ctx.send(arg) #отправляем обратно аргумент
bot.run(TOKEN)
Answer the question
In order to leave comments, you need to log in
Well, the error is right in the trace:
Cannot connect to host discordapp.com:443
certificate verify failed: unable to get local issuer certificate
SSL problems. Either the time on the computer is different from the real one, or someone is really sitting in the middle with a fake certificate.
upd: I also recommend to look at a similar question: What to do with the Process finished with exit code 1 error when starting a discord bot?
Instead
of 'token' insert your bot
's token like here >>>TOKEN = 'токен'
TOKEN = 'NzIxMzM0MzIzMzE1MzQzNDMx.XuTBFg.U'
client.run(TOKEN)
Reinstall discord.py and other folders associated with it, due to incorrect update, its old folder remains and files disappear
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question