Shadow
DIAdiscord.js - Imagine an app
•Created by Shadow on 10/4/2024 in #djs-questions
Sharded Discord.js bot resets to initial presence status
Thank you so so much! Moving the
setInterval
logic to shardReady
did the trick!10 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 10/4/2024 in #djs-questions
Sharded Discord.js bot resets to initial presence status
What do you mean "nothing we can do about it"? I never said that it's a bug in Discord.js or something. But this is a Q&A forum and the question is about DiscordJS features
10 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 10/4/2024 in #djs-questions
Sharded Discord.js bot resets to initial presence status
I'd rather have it now instead of having it too late.
there is no disadvantage in using it already anyway, even if it just spawns one single shard.
but this is besides the point of this question anyway. even if I remove sharding now and the problem is "resolved", once I implement it again, the problem will be back. so why not find an answer now rather than later?
10 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 10/4/2024 in #djs-questions
Sharded Discord.js bot resets to initial presence status
the hybrid sharding package does it automatically on-demand, but currently it only starts one shard
10 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 10/4/2024 in #djs-questions
Sharded Discord.js bot resets to initial presence status
is there a way to catch reconnect events? so I can set the correct status again?
also, I feel like it still kills my interval. because it used to be 5 minutes and in my if condition for the guild count I also had
|| status == "Starting..."
but that didn't fix it sadly
just checked, its still in the code
so it shouldn't only set when the guild count changes10 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 2/10/2024 in #djs-questions
Bot status occasionally reverts back to initial status from the status set in ClientReady
so, shardReady doesnt really work in my case because it fires with ClientReady which is why I do it with a preiodic check like @gwapes suggested now
11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 2/10/2024 in #djs-questions
Bot status occasionally reverts back to initial status from the status set in ClientReady
alright, I see. thanks! :)
11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 2/10/2024 in #djs-questions
Bot status occasionally reverts back to initial status from the status set in ClientReady
the presence isn't static. ill give shardReady a try. whats the difference between that and shardResume?
11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 2/10/2024 in #djs-questions
Bot status occasionally reverts back to initial status from the status set in ClientReady
Nah I don't think an interval is a good solution. Since somehow the client options are re-set under a certain condition without calling ClientReady again, I assume the shard is re-initialized. Which means I should be able to set the status again by catching the ShardResume event. but since I can't really test that I thought I'd ask here first
11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 5/27/2023 in #djs-questions
Can't use Emoji from other Server in followUp.
thanks for taking the time to help! :)
11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 5/27/2023 in #djs-questions
Can't use Emoji from other Server in followUp.
yea
.replied
could work too. but just had a brain lag. its not even needed11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 5/27/2023 in #djs-questions
Can't use Emoji from other Server in followUp.
actually, doesn't matter. those replies don't use emotes and having that "prefix" followUp before the last reply is a failsafe in any case
11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 5/27/2023 in #djs-questions
Can't use Emoji from other Server in followUp.
hmmmm
11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 5/27/2023 in #djs-questions
Can't use Emoji from other Server in followUp.
Ohhhh, I see! So because of my deferReply (bot takes a while to compute) the first followUp is just an editReply under the hood. Sorry, didn't understand that at first. Yea with the second follow up it works too. That opens another can of worms now tho since between the deferReply and the embed send reply there are potential followUps in between if something goes wrong / cant be parsed / etc
11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 5/27/2023 in #djs-questions
Can't use Emoji from other Server in followUp.
---
Also thanks for the answer and the valuable insights!
11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 5/27/2023 in #djs-questions
Can't use Emoji from other Server in followUp.
Eh ill just use the followUp to "prefix" the actual reply. Its a bit ugly but whatevs.
11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 5/27/2023 in #djs-questions
Can't use Emoji from other Server in followUp.
oof. So I'm still better off with just using
.send()
instead of .followUp()
because seems like UseExternalEmojis
isn't set on everyone per default.
and I can't have my embed fail on server that didn't explicitly set the permission.
Is it an actual confirmed bug or is it just discord not caring again?11 replies
DIAdiscord.js - Imagine an app
•Created by Shadow on 5/27/2023 in #djs-questions
Can't use Emoji from other Server in followUp.
11 replies