Aug-10-2019, 09:39 PM
Hello guys I'm trying to create a Discord bot, using python language, I recently started studying this language so I'm asking for help in this forum.
I downloaded it as a PyCharm editor that also has a built-in compiler that can run the program like the Dev c, the only thing I encountered a couple of problems.
Even if I correctly install the library of discord.py give me these errors, I do not know if I did something wrong in the source code, or it is a problem of the version of the library or python, I wonder if you can a hand from more experts thank you very much.
P.S: Forgive me for my bad English, but I don't speak English at a higher level, being of Italian origin.
This is the source code
I downloaded it as a PyCharm editor that also has a built-in compiler that can run the program like the Dev c, the only thing I encountered a couple of problems.
Even if I correctly install the library of discord.py give me these errors, I do not know if I did something wrong in the source code, or it is a problem of the version of the library or python, I wonder if you can a hand from more experts thank you very much.
P.S: Forgive me for my bad English, but I don't speak English at a higher level, being of Italian origin.
This is the source code
import discord
from discord.ext import commands
client = commands.bot(commands_prefix = '$')
TOKEN = 'MY TOKEN'
client = discord.Client()
@client.event
async def on_ready():
print("Il bot e' pronto!")
await client.change_presence(game=discord.Game(name="Gioca a Magic Lantern"))
if message.content.startswith('$ciao'):
msg = 'Ciao {0.author.mention}'.format(message)
await client.send_message(message.channel, msg)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
client.run(TOKEN)This is the error:
