Open Tnology opened 1 year ago
GET /guilds/471700758354460672/members/1017989345292058656 returned 404
(10007) Unknown Member
tells you it. You are doing something with members and for some reason the member is not found in the guild. Just a guess:
You might do something with your server members after receiving and holding a list of them? What happens if a member leaves your server in the meantime? It might be the culprit. I think you need to refetch your members and validate the member still being in your server.
Just a guess, I'm not really playing with the member API at all, but that's what it reads to me. 😇
What's the bug? My bot, which uses Harmony, will sometimes crash at random with an "Uncaught DiscordAPIError".
How do we reproduce it? I'm unable to consistently reproduce the error. My bot will randomly crash if I leave it running, and I'm not sure about how it's triggered. The code to my bot is here: https://github.com/Tnology/TnologyDiscordBot
What should have happened? The bot is supposed to function properly and not crash.
What is actually happening? While my bot is running, the bot randomly crashes with an error as seen below:
The bot fully stops as a result of the crash and needs to be restarted.
What versions you're using?
daca400ae9feab
Do you have anything to tell us more about the bug? I attempted to use an unhandledrejection event handler, but it doesn't really work in my bot's code. Here is the code that I tried with my bot:
Source: Deno Docs, https://deno.com/blog/v1.24#unhandledrejection-event
Instead, here is the output that I get (trying to run on Windows 11, as I am testing from VS Code):
It works in the Deno CLI when I just run
deno
and paste the code there, but not with my bot. I'm not sure why.