jr
DIAdiscord.js - Imagine an app
•Created by jr on 9/3/2024 in #djs-questions
Tracing activity and ratelimits
Hi,
I would like to be able to collect information on what all a bot is doing over the API (what endpoints are being hit and request duration etc) and be able to understand things like when ratelimits are being hit. This would help me ensure all is working well with my bot and triage things like hangs.
Does Discord.JS support any means of collecting diagnostic information like this? Alternatively, is there any way to easily hook into Discord.JS internals for this?
8 replies
DIAdiscord.js - Imagine an app
•Created by jr on 1/5/2024 in #djs-questions
Spurious messageUpdate
I just observed a messageUpdate event emitted on a message from 2018 that doesn't show as edited. What can cause this other than an edit? There are no embeds to the message so it shouldn't be embed related. Can this event fire when there is no change?
14 replies
DIAdiscord.js - Imagine an app
•Created by jr on 1/2/2024 in #djs-questions
Check timeouts that have been issued
Is there a way to get a list of timeouts for users on a guild similar to Guild.bans?
My specific use case: I need to check if a timeout has been issued for a specific user even if they aren't in the server, which
guild.members.fetch(...)..communicationDisabledUntil !== null
doesn't work for.11 replies
DIAdiscord.js - Imagine an app
•Created by jr on 11/7/2023 in #djs-questions
Send video as attachment from url
I'm trying to send a video as an attachment but I'm getting an error
What am I doing wrong?
If I upload from my client itself I see an attachment object that looks like this
Which fields do I need to include?
13 replies
DIAdiscord.js - Imagine an app
•Created by jr on 10/25/2023 in #djs-questions
Prevent link embeds while sending a message
How can I prevent link embeds while sending a message? I'd like to avoid
<url>
if possible since I'm working with user-controlled input.
https://github.com/discordjs/discord.js/issues/7818 seems to suggest it's technically possible to surpress at send time rather than doing a followup suppressEmbeds call7 replies
DIAdiscord.js - Imagine an app
•Created by jr on 9/10/2023 in #djs-questions
detect kick
Is there an easy way I can detect when a guild member is kicked?
3 replies
DIAdiscord.js - Imagine an app
•Created by jr on 9/4/2023 in #djs-questions
channel.messages.fetch is giving messages outside the after/before range
I am encountering an issue where
is giving messages outside the specified range. What could cause this? Is it a discordjs bug or a discord api bug?
5 replies
DIAdiscord.js - Imagine an app
•Created by jr on 7/31/2023 in #djs-questions
Somehow getting forum posts from a completely unrelelated forum channel
I have a utility function to fetch threads from a forum channel
Somehow this utility is giving me a completely unrelated forum post though:
I'm getting an output of
Git 1124619767542718524 1013107104678162544 forum-a
. The thread "Git" is from a channel called resources, not forum-a. I have no idea how it got here. I have no idea why the parent id could be different.
The functions the utility calls
What's happening?5 replies
DIAdiscord.js - Imagine an app
•Created by jr on 5/4/2023 in #djs-questions
Incorrect reaction.count
I'm getting a reaction.count of 1 after receiving a reaction add event despite the message having 17 of these reactions. What can I do to troubleshoot this? I'm calling on partial reactions when needed, though that's not the case here.
36 replies
DIAdiscord.js - Imagine an app
•Created by jr on 4/29/2023 in #djs-questions
Easiest way to lock a channel
What's the easiest way to temporarily lock a channel so no users can send messages?
3 replies
DIAdiscord.js - Imagine an app
•Created by jr on 4/17/2023 in #djs-questions
Expanding the message cache
Quick question: Will this create a cache of 5000 message per channel?
I'm running into an issue where message reactions aren't being seen because the messages are presumably falling out of the cache.
5 replies
DIAdiscord.js - Imagine an app
•Created by jr on 4/10/2023 in #djs-questions
Sending a video embed
Is it possible to send a video embed as a bot?
10 replies
DIAdiscord.js - Imagine an app
•Created by jr on 4/10/2023 in #djs-questions
Easiest way to check if an emoji is default or belongs to the server
20 replies
DIAdiscord.js - Imagine an app
•Created by jr on 2/26/2023 in #djs-questions
Sending a text attachment
How can I upload and send a text attachment in discordjs?
6 replies
DIAdiscord.js - Imagine an app
•Created by jr on 2/25/2023 in #djs-questions
RoleSelectMenuBuilder
How do I set the roles available in a RoleSelectMenuBuilder? There's no .setOptions method it seems
10 replies
DIAdiscord.js - Imagine an app
•Created by jr on 11/20/2022 in #djs-questions
Text inputs
Are text inputs only a thing for modals?
I need both a select menu and a text input and it seems select menus can't go in modals and text inputs can't go in another interaction reply.
7 replies
DIAdiscord.js - Imagine an app
•Created by jr on 11/18/2022 in #djs-questions
Suppressing specific embeds
15 replies
DIAdiscord.js - Imagine an app
•Created by jr on 11/12/2022 in #djs-questions
Message embeds are empty for image link
I'm running into an issue where a user sends a image link and the bot sees the image has empty embes on message create. If the user re-sends the image link, the bot recognizes it has embes immediately on message create.
What causes this? How do I address it?
3 replies
DIAdiscord.js - Imagine an app
•Created by jr on 11/11/2022 in #djs-questions
When can ChatInputCommandInteraction.channel be null?
When can ChatInputCommandInteraction.channel be null?
9 replies
DIAdiscord.js - Imagine an app
•Created by jr on 11/3/2022 in #djs-questions
Check if user has write permissions in channel
Is there an easy way to check if a user has write permissions for a channel?
7 replies