So today im trying to learn the basics of discord bots & coding, But i get this error when i try to run my bot.
screenshot https://gyazo.com/264d179484d54d863dac2e5af770134b
Iwould love help.
screenshot https://gyazo.com/264d179484d54d863dac2e5af770134b
Error:Traceback (most recent call last):
File "C:\Users\edwin\Desktop\CustyCancookie.py", line 1, in <module>
import discord
File "C:\Users\edwin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\__init__.py", line 20, in <module>
from .client import Client, AppInfo, ChannelPermissions
File "C:\Users\edwin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\client.py", line 38, in <module>
from .state import ConnectionState
File "C:\Users\edwin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\state.py", line 36, in <module>
from . import utils, compat
File "C:\Users\edwin\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\compat.py", line 32
create_task = asyncio.async
^
SyntaxError: invalid syntax
This is my codeIwould love help.
import discord from discord.ext.commands import Bot from discord.ext import commands import asyncio import time Client = discord.Client() client = commands.Bot(command_prefix = ",") @client.event async def on_ready(): print("Bot is ready") @client.event async def on_message(message): if message.content == "cookie": await client.send_message(message.channel, ":cookie:") client.run("ImNotLeakingMyToken")