Febkosq8
Febkosq8
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 5/25/2024 in #djs-questions
Message object rate limits
Few questions on messages editing: Trying to implement a single message that will be updated for all my discord player events. as in update the original interaction reply message till the end of the lifecycle for that queue possibly. 1) I know the interaction is valid for a max of 15 mins. However can I do .fetchReply() even after 15 mins ? 2) is storing the interaction and then fetching the message or storing the message object directly int othe metadata for the queue better ? 3) should I be worried about rate limits for updating the message ? Possible scenario, I put a 10 sec clip for playback. the bot sends the original confirmation reply > audioTrackAdd > playerStart > (10 sec clip plays) > emptyQueue > disconnect messages in that order. the first 3 events might be in very short intervals. talking about seconds here.
15 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 12/21/2022 in #djs-questions
Author missing from oldMessage on MessageUpdateEvent
6 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 12/9/2022 in #djs-questions
DM messages not triggering events consistently
I am getting my messageCreate & messageUpdate event correctly when the message is made in a guild, but in DM it doesn't trigger consistently.
My intents
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildInvites,
GatewayIntentBits.GuildBans,
],
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildInvites,
GatewayIntentBits.GuildBans,
],
8 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 12/2/2022 in #djs-questions
Determine what page the current embed is in when a button was pressed
35 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 11/22/2022 in #djs-questions
MessageUpdate gets triggered whenever another bot posts a message with embed
my bot keeps on triggering message update when ever another bot (PingCord in this instance) post a new message with an embed. idk why a update event keeps on triggering even when there is no message update taking place
18 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 11/14/2022 in #djs-questions
MessageUpdate event triggered on interaction reply
My bot sends a reply to a interaction that was initially defered. When the reply is posted it is triggering a messageUpdate event. how can i avoid this ?
19 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 11/2/2022 in #djs-questions
add role to a member
8 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 10/31/2022 in #djs-questions
Getting a member list on new guild event
I am trying to get a list of members when a new server add's my bot. Listening on the event "client.on("guildCreate", async (guild) => {" I am trying to print console.log(guild.members) but i dont get anything userful
33 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 10/17/2022 in #djs-questions
How to see which option was triggered from an interaction
I have a slash command where there are two options (say a and b). a has three choices say 1,2,3 b has no additional options I know that i can get the choice that was triggered from option a by doing let cmd = interaction.options.get("a"); but how can i know which option was triggered ? also can i add a option to a choice ? i.e. if user selects option a with choice 1 i want them to pass a integer value too
31 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 10/16/2022 in #djs-questions
Implementing slash commands with options - choices
I am trying to add options to my existing slash command code but on testing discord does not show me the options . I already tried re deploying my guild commands.
50 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 10/15/2022 in #djs-questions
How to publish guild specific commands while having global commands
I have two folders for two categories of commands. One folder named "commands" for global commands and one folder named "guildCommands" for commands that is for only some guilds.
56 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 10/15/2022 in #djs-questions
Implementing global commands
17 replies
DIAdiscord.js - Imagine an app
Created by Febkosq8 on 10/15/2022 in #djs-questions
Getting a text channel id and name
I am trying to post a welcome message when my bot join's a new server. I am trying to find a text channel where it has perms to post but my current code just returns undefined welcomeChannel = guild.channels.cache.find( (channel) => channel.type === "text" && channel.permissionsFor(guild.me).has("SEND_MESSAGES") );
23 replies