Как настроить Discord BOT с помощью PythonPython

Программы на Python
Anonymous
Как настроить Discord BOT с помощью Python

Сообщение Anonymous »

Я сделал это по учебнику, но когда я играю в «Запуск», появляется сообщение об ошибке в строке 5
import discord
import os
my_secret = os.environ['token']

client = discord.Client()

@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))

@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('Hello'):
await message.channel.send('Hello')

client.run(os.getenv('token'))


Подробнее здесь: https://stackoverflow.com/questions/741 ... ith-python

Вернуться в «Python»