Ask coding questions

← Back to all posts
Why I am getting SyntaxError from asyncio package
tasinone (0)

I am trying to run a discord bot on replit. But whenever I run the file it gives me an error and it seems like coming from asyncio package. Can someone please check it and give me the solution.

Comments
hotnewtop
xfinnbar (211)

Please use the token from a secret (on the sidebar) and please do not follow outdated tutorials. If anyone gets your token, they can control your bot.

tasinone (0)

@xfinnbar this code is from github. and you can see that the error is not from the code. it's from the package.

xfinnbar (211)

@tasinone No, the code is for an outdated discord.py version. Please don't follow old tutorials/templates, like I said.

tasinone (0)

@xfinnbar maybe you are right but a bot is running on discord using same code. name is Melody.

xfinnbar (211)

@tasinone They are still running the old version of discord.py. You should avoid doing this as if a major change in Discord occurs you are left in the dark and no support will be given to you. You also cannot use newer Discord features if you do this.