import discord
import random
import asyncio
import pickle
import os
client = discord.Client()
@client.event
async def on_ready():
print('logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
if message.content.startswith('!hello'):
await client.send_message(message.channel,'sample text')
client.run(MY_TOKEN)
when i run it it prints the following message :
Traceback (most recent call last):
File "C:/Users/Tommy/PycharmProjects/discord/discord.py", line 1, in <module>
import discord
File "C:\Users\Tommy\PycharmProjects\discord\discord.py", line 8, in <module>
client = discord.Client()
AttributeError: module 'discord' has no attribute 'Client'
not sure what to do here, i already set the paths in the interpreter but it still prints this message, i got all this code from a youtube video and it is verbatim so i dont know why it is not working