BoomerangRosalina / BoomerangRosalinaBot

The Basic Source Code from the Boomerang Rosalina discord bot for Moderation and Utility needs
MIT License
3 stars 0 forks source link

Timeout Command Not Working in Python 3.9 or higher. #2

Open BoomerangRosalina opened 2 years ago

BoomerangRosalina commented 2 years ago

If you are using Python 3.9 or higher, the timeout command may not work anymore. You may encounter this error: "Command raised an exception: RuntimeError: Timeout context manager should be used inside a task" I have no idea how to fix this so instead, stay with Python versions lower than 3.9. Same goes with the avatar part of the code in the serverinfo and userinfo command. If you know how to fix this issue, open a issue on this github page or reply to this issue.

BadUserHater commented 2 years ago

I think your entire problem is that you are using Discord.py 2.0, read their docs and maybe this will solve your problem. Hope this helps :)

https://discordpy.readthedocs.io/en/stable/migrating.html

BoomerangRosalina commented 2 years ago

Ok thank you. I figured out my entire problem. It is because discord.py 2.0 would use different code to timeout members.