djs-questions

9202 threads · Page 130 of 185

The problem with Events.GuildMemberUpdate. 10 messages
stone thorn client.on(Events.GuildMemberUpdate, async (memberBefore, memberAfter) For some reason memberBefore has no roles when th...
Member still showing in cache after leaving 7 messages
inner condor Hello, I am making a "guilds" command to get a list of guilds a member is in (the bot is in multiple guilds). Upon the ...
Error type. Typescript 10 messages
toxic latch Hi, I want handle error correctly in discord.js. For example `client.login` `.catch((err /* Which type is the error*/) ...
TypeError: Cannot read properties of null (reading 'user') 6 messages
hasty iron There is no problem in my codes but I am getting an error.
How to send image link, and have it be displayed? 16 messages
silk salmon I've built a wrapper builder for the embed builder, and message payload. I am expecting by placing an imgur link in the ...
Gateway Rate Limits 4 messages
tired field Similar to the HTTP API, Discord has a Gateway rate limit (https://discord.com/developers/docs/topics/gateway#rate-limit...
Deleting a Component after a certain period of inactivity (Solved) 4 messages
elfin phoenix Is it possible to remove a component after a certain period of time if no one uses it? ```ts const select = new StringSe...
User can use built-in slash commands but not bot commands 7 messages
hollow pewter I want a channel where the user can send a bot slash command, but not send messages. But in the channel in question, the...
Narrowing type of GuildBasedChannel to TextChannel 2 messages
barren vigil I have a GuildBasedChannel that I am trying to narrow to the type of TextChannel. I tried guarding with isTextBased() bu...
Pause/unpause all invites link via d.js 2 messages
fallen dome How to?
How can .setDefaultMemberPermissions() be used in subcommands? 3 messages
quasi dagger When using subcommands is there a remedy for .setDefaultMemberPermissions() not being a function? Do I just have to impl...
Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred. 3 messages
turbid lantern <:meguFace:485155746489565194>
interactionCreate providing old message. 2 messages
silk salmon When getting `interaction.message` for a ButtonInteraction, when doing `editReply`, then clicking the button again. The ...
missing needed "data" or "execute" features 5 messages
solemn fjord wierd error not letting commands run and pops up when I deploy commands.,
trouble with awaitMessages not triggering for a DM channel 5 messages
thorn glen pretty new to discordjs and am trying to console log the content of any message that is sent after the bot asks: "What h...
createReactionCollector not collecting any reactions 4 messages
signal marlin Node verison: 18.16.0 Hello, I am trying to use a reaction collector to collect ✅ reactions on an embed reply to the com...
API Error 10062 - Unknow interraction 15 messages
grizzled python That error appear after clicking on a button or after a slash command, defer doesn't work and the value in interaction ...
V14 Problem 3 messages
rare mortar Problems İs V14 Function And Button Create Error Please Help Me ?
Not authorized to deploy commands but can login 3 messages
latent otter So when i deploy my commands it says ``` DiscordAPIError[20012]: You are not authorized to perform this action on this a...
Import client variable in a SlashCommandBuilder function 22 messages
lucid parrot Hello, i'm trying to use the client variable inside a command but its not accessible.
Resolving Union Type Issue with getMember 9 messages
barren vigil I'm currently working on a codebase I inheritted that has a lot of callis to the `getMember` function on various interac...
AutoModerationRules : mentionRaidProtectionEnabled 1 messages
narrow needle Hello ! I'm creating automod rules, and for the mention spam I saw on discord the option to enable or not the mention ra...
Why it gives me this error? 32 messages
serene moth const { Client, Intents, SlashCommandBuilder } = require('discord.js'); const client = new Client({ intents: 3276799 });...
how dows discordjs fetch roles and nickname on messagecreate? 23 messages
ancient wedge Hello, I need my bot to use guild_nicknames instead of username. I saw that this info is not available in the message co...
Cache Customisation 28 messages
scarlet geyser So ideally I wanted some help with caching customisation. I noticed that djs caches a TON of stuff that I don't even nee...
V14 Bot is using more RAM compare to v13 41 messages
misty vine After migrating from v13 to v14, my bot is using 100% of available RAM in server. It use approx 500MB RAM for 3 guilds a...
Deleting messages with button action 5 messages
random terrace hey so i know this is probably a really minor issue but i'm making an interactable embed with button interactions and im...
MuteMembers mutes a member on the server 14 messages
lost harness i have a channel created and gave the owner MuteMembers perm however it allowes the owner of the channel to mute members...
Modal Components Maxmimum 14 messages
stoic wave The guide says that a modal can handle up to 5 ActionRowBuildes. When i add a 4rd, the bot crashes every time when i ope...
Bot cannot send message to announcement channel 17 messages
charred wigeon Hi, i want my bot to send message automatically without any prompt to the announcement channel. Already give permission ...
Bot crash without reason 22 messages
sour fractal Hello, after a few hours (minimum 2 hours) my bot crashes for no reason.
Sharding VPS Splitting 2 messages
waxen galleon Hello, I was wondering if it was possible to do Sharding with multiple-VPS (I'm just curious), for example with: "Shar...
whats disallowed intents? its used to work before. 7 messages
honest bough ``const { Client, REST, GatewayIntentBits, Collection, EmbedBuilder, Routes } = require('discord.js');``
Error when creating a button and a menu through a function 8 messages
wild raptor Hello, I get this error: ```js DiscordAPIError[50035]: Invalid Form Body components[0].components[BASE_TYPE_BAD_LENGTH]...
get message from channel automatically 9 messages
ebon citrus I have built a bot, and now I want to add a feature where the bot automatically seeds the database with any messages sen...
i cant handle this problem plz help 15 messages
quartz talon ```Javascript // !순위 async function myGamblingRank(Message) { var balance = await db.get("balance"); // {"id1": blc1, ...
Im handling with old discord.js bots and i have this error 12 messages
quartz talon UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'displayName' of undefined how can i fix it ??
awaitMessages not returning an output 5 messages
arctic siren ```ts const questionFilter = (m:Message) => { return m.author.id == interaction.user.id; } channel....
Interaction has already been awknoledged 5 messages
west iron Everything works just fine , but i get this error when i use it for the second time , but everything works
I don't now why it don't works 8 messages
dusty sapphire code : require('dotenv').config(); const { Client, Collection, GatewayIntentBits } = require("discord.js"); const fs =...
Discord bot that sends direct messages (read before you go nuts from the title) 12 messages
last fiber I want to create a Discord bot for an online community for a game. I want to be very specific and ask for your opinion r...
Injecting/overriding gateway identify properties on latest version of discord.js 4 messages
spice zodiac Question says it all (a WebSocket rewrite broke the ability to add them)
AuditLogEvent - Kick and Ban 5 messages
grizzled python I'm trying to logs who kicked or banned a user. I'm using the code in discord.js.guide for AuditLogEvent, but I don't ha...
How long am I able to save User data in my database and what about the EU Terms 9 messages
valid scaffold Hey I was creating a bot and heard somewhere that you only can save User data for 30 days before you have to delete it. ...
string with modals 4 messages
tawny vapor First if im having trouble with my modals and string slect menu is that djs related?
slash commands problem 4 messages
cursive sparrow Hello, I have a problem with discord bot. I did slash commands but they don't work because it shows me that "the applica...
Editing an existing embed's footer 15 messages
obtuse schooner So I know I can modify an existing embed's content but when it comes to footer, I am only able to change the footer if t...
Typescript: ActionRowBuilder<> is not assignable. 4 messages
arctic siren I seem to be getting this error: ```fix Type 'ActionRowBuilder<AnyComponentBuilder>' is not assignable to type 'APIActio...
Verification Question 2 messages
gloomy flame Is there any way to fetch all member who dont got verified number or email
Bot doesn't start after a file obfuscation 8 messages
rough coyote Hi, I want to obfuscate a short .js file, but when I obfuscate this file and then run the "node index.js" command, the b...