Forums

Discord Bot on PA?

Hello, to those who have experience with running Discord bots on PythonAnywhere, what are some tips on running one? I am trying to host a 24/7 bot that interacts with PA MySQL (storing and manipulating messages on there). How would I do about this? I have seen some posts in the past saying that the folks at PA unplug the consoles every now and then for maintenance. How would I recover the bot automatically from that (with minimal downtime)? Also, how many CPU usages does a bot typically take (eg 2000s worth -- or I need more)? Please give your opinions, I do not wish to be looking for a different host just because of a Discord developer telling me that long polling is terrible for their API servers.

PS I'm the guy who made this post happen https://www.reddit.com/r/discordapp/comments/68o2tl/ive_created_an_embeddable_iframe_page_for_your/

Check out this for long running tasks.

You will probably have to experiment with how many cpu seconds it will take (probably highly dependent on your code etc)