probablyraging
DIAdiscord.js - Imagine an app
•Created by probablyraging on 3/4/2024 in #djs-questions
MaxListenersExceededWarning: Possible EventEmitter memory leak..
I recently switched my project from CJS to ESM, and while nothing in my code actually changed other than my import/export syntax, I am now getting the following alert which never happened in the years of running the bot before the changes
I have added
setMaxListeners(20)
to suppress the alert in the mean time, which it has, but I'm curious to know where this has come from and if I need to look into it more? I do have about 16 client event listeners, and I only use the intents/partials that I require12 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 11/1/2023 in #djs-questions
Fetching ForumChannel threads returns ThreadChannels from all ForumChannels
I am trying to fetch threads from a specific
ForumChannel
, however, the ThreadChannel
s that are returned are not from the specified ForumChannel
, but rather from every ForumChannel
on the server
Here is a snippet of what is returned by threadChannels
. Notice that the parentId
fields are incorrect
Is this a bug or am I not understanding the use of GuildForumThreadManager#fetch()
?8 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 1/12/2023 in #djs-questions
Banning a previous user by ID
Command
targetToBan
seems to resolve a user object
Error
6 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 11/8/2022 in #djs-questions
Non-ephemeral reply into an ephemeral reply - vice versa
Is it possible to defer an interaction non-ephemerally and then later followup or edit it to be ephemeral, or vice versa?
4 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 10/23/2022 in #djs-questions
ThreadChannel.setName and .setLocked issue
Trying to set a thread's name and then lock it, but neither of these methods seem to work correctly.
setName
works sporadically while setLocked
nothing at all
Sample
Full command
5 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 8/7/2022 in #djs-questions
Undici UND_ERR_ABORTED when fetching channel messages
Simply trying to fetch the most recent message in a channel when the error occurs. Am noticing Discord is being a little slow at the moment with things like deleting message, loading channel etc.. but not sure if this could be related
• [email protected]
• v16.16.0
2 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 7/22/2022 in #djs-questions
How long do global command stay active?
Is there an expiry on global command? Or is it the case of registering them and then leaving them be until they need updating or whatever?
4 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 7/21/2022 in #djs-questions
Adding a new field to an existing embed
I'm currently fetching the message containing the embed I was to edit and then getting the embed, but I can't figure out how to add a field to it without having to resend the entire embed?
11 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 7/18/2022 in #djs-questions
Webhook avatar missing
10 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 7/18/2022 in #djs-questions
EmbedBuilder random .setColor()
Is it still possible to set a random color with EmbedBuilder?
3 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 7/14/2022 in #djs-questions
Select menu option value of modal returns 'undefined'
Modal component
Interaction handling
Result
So why is value 'undefined'?
2 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 7/14/2022 in #djs-questions
Fetching a forums channel
How can I fetch a forum channel, similar to
guild.channels.cache.get()
?
When I do this for a forum channel it returns undefined
4 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 7/12/2022 in #djs-questions
Fetching audit logs when there is an AutoMod blocked message event throws an error
Fetching audit logs that contain an AutoMod blocked message event throws an error. How can I fix this?
8 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 7/12/2022 in #djs-questions
AutoMod event when a message is flagged
Is there an event that fires when AutoMod flags a message? I want to build upon what AutoMod already offers for flagged messages (blocking and timeout), such as banning, sending a DM etc..
6 replies
DIAdiscord.js - Imagine an app
•Created by probablyraging on 7/11/2022 in #djs-questions
Sending a DM to a user who the bot does not share a server with
I'd like to make a ban appeal process for my server/bot. When a user is banned using either the context menu or the systems
/ban
command, the guildBanAdd
event is fired, I would then like to send the user a DM notifying them that they were banned and how to appeal it.
However, seeing as once the guildBanAdd
event is fired, that user is no longer in the server at that point, so I don't think it's possible for the bot to send them a DM, correct? Or am I missing something?11 replies