Replies: 1 comment
-
It's quite likely that you are spamming the server by querying a lot of message history every 10 minutes. Solution: do not use history() inside a task. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've written a Discord bot that uses multiple cogs. However a few of my cogs stop working when a
discord.errors.DiscordServerError: 500 Internal Server Error (error code: 0): 500: Internal Server Error
error is raised.The functionality of those cogs no longer work until I restart the entire bot, but the other cogs work just fine. From what I can see, this is happening due to using
channel.history()
. Once the error is raised, channel history does not work obviously and thus the cog "shuts down." Other cogs that do not rely on that function work totally fine after the error (once discord comes back up), so the bot does not shut down - only this specific function for whatever reason.Here is the full traceback:
I was curious if anyone had any sort of recommendation on handling this? Maybe writing a script to auto-restart the entire bot if this error occurs?
If it matters how I'm using it, here is an example:
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions