djs-questions

13317 threads · Page 176 of 267

Enable or Disable Application Commands for specific Channels 12 messages
vestal iris How do you do this? Not like with returning an error or doing nothing. I mean blocking the command completly like this r...
Fetch most recent non-system message 3 messages
orchid pollen One feature of my bot is checking who sent the most recent message in a channel of interest. I currently just use```js l...
Missing author in message object 6 messages
winged edge Hey when i listen to the messageDeleted Event i get the message. Now i want the author but its null
Code kept on crashing instead of catching the error when the channel does not exist 8 messages
fierce iron Hello, I'm trying to set an auto-delete on a channel created by a slash command but for some reason, the try...catch opt...
DJS filter method 8 messages
plush needle Hey, haven't used the DJS lib in a while... would there be any reason it never gets to the forEach method that pushes th...
where is the spliceOptions() method on v14's main version? 16 messages
zealous willow hi guys, i was using the method on v13.8.1...: https://discord.js.org/#/docs/discord.js/13.8.1/class/MessageSelectMenu?s...
How to get the all members of a discord server using discord.js 31 messages
keen moon I am getting the issue while getting the member list of discord channel using discord.js guild. Could you please someone...
Banning a previous user by ID 7 messages
deep crest **Command** ```module.exports = { name: `test`, description: `dummy command`, defaultMemberPermissions: ['Ad...
Emitter memory leak 5 messages
Receive DM from user to Bot 5 messages
heady pilot This is how i check for DM: ```js // Receive DM from users if(msg.channel.type === d.ChannelType.DM) { conso...
Bot Started Twice 5 messages
inland belfry I'm using nest.js with @discord-nestjs/core and @discord-nestjs/common. I tested my bot and connected to the discord api...
[RESOLVED] Adding reaction to the webhook 18 messages
blazing rain This is my code: ```js async function createSuggestion( interaction, titre, description ) { const embedSuggestion = ...
Presence? 5 messages
last relic Hello i kinda wanna know if its possible to check a user's presence status like if they're online or offline or anything...
Can you find location of member? (v14.5.0) 9 messages
edgy dune I am trying to create a command which tries to detect whether you are in India or not.
can you create a deeplink in a discord embed? 8 messages
acoustic pagoda hello guys, does anyone know if its possible to use a deeplink (example: myproject://myurl) to open another (Electron) a...
@discordjs package
everyone not working 16 messages
sinful kelp client.channels.fetch(factionChannel).then(channel=> {channel.send("@everyone wtf")}) it sends the @everyone ping but d...
ticket system breaking because of reactions overloading 2 messages
frigid acorn hey, does anyone know how to fix this? when I overload my bot my spamming reactions it'll slow everything down and when ...
Move to voice channel 13 messages
midnight roost Hello, I have an array with the IDs of the participants that are connected to the voice channel, I need to move them to ...
Two slash commands don't work 13 messages
orchid inlet Hi! I tried to build two slash commands with two interactions, but the bot doesn't work, but when I create one slash com...
Getting Invalid Token error on a new token? 23 messages
lofty fern Hey all, I'm trying to get started on a new bot, but when running the sample code with my token I keep getting the error...
Disable button method not working? 15 messages
quaint loom **NSFW** - Hello, i'm using this to edit a command that is used to post an NSFW image to the server. This button allows ...
Commands dont get executed somehow 11 messages
pliant ibex ```js const { SlashCommandBuilder } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() ...
DiscordAPIError[50027]: Invalid Webhook Token 5 messages
GuildMemberRemove/Add event not triggering 14 messages
chilly glade I have added the `GatewayIntentBits` in my main file: ```js const client = new Client({ intents: [GatewayIntentBits.Guil...
question 8 messages
stone thunder in ```js let member = 0; member +1 = 0 ``` i want the bot start to numerize the member from 1 to ............ unlimit n...
slash command doesn't load 22 messages
near shell Hello, I try to create new bot discord but when i run it everything is okay. Commands are successfully loaded, my bot is...
How can I use a hex to set colors? 14 messages
onyx oasis Hm
Get the second message in a channel? 5 messages
lilac wadi How might I get the message object of the second or third message in a channel?
Fetches messages in a channel v14 27 messages
zealous karma Hi I have not touched anything regarding discord.js in about a year or so, and currently am writing a simple bot that ...
Discord Moderation Bot 33 messages
plucky ember I was attempting to make a simple bot for moderation for my discord server (want specific features not in automod). The ...
threadUpdate not firing if not cached (i think?) 46 messages
tired scroll If I Open or Close a Forum post in a forum channel, 'threadUpdate' will not fire, unless that post has been updated befo...
DiscordAPIError Interaction already acknowloged 37 messages
tranquil shadow I'm making a bot that allows users to collect potatoes when a staff sends a command. Basically it sends an embed with a ...
question 16 messages
stone thunder ```js const button = new ActionRowBuilder() .addComponents( new ButtonBuilder() ...
What happened to Client.setIntervall() 14 messages
flint sequoia What happened to the function Cilent.setIntervall(function, intervall) ?
question 5 messages
stone thunder ```js const embed2 = new EmbedBuilder() .setImage(interaction.guild.iconURL({size : "2040" , dynamic:tru...
DiscordAPIError[50035]: Invalid Form Body | Verify Bot Command Deploy 38 messages
craggy spoke Hello, the following error code suddenly appeared when deploying / commands global for a verify bot. I'm too stupid for ...
Button and Commands 2 messages
slim peak Hello! Is there a way to make a button execute a specific command when it is clicked?
Can discord bots click a button? 4 messages
sage bobcat Hi. Is there any way to click button with bot or token
How do I start a function with a var in the name? 3 messages
cinder knoll I need to call this function using a variable (nação). I made it as its shown in the images but it lead me to an error....
Differences between interaction.type == and interaction.is 7 messages
storm perch Hey, i wanna ask what is different in methods from title? I have in my code both of them, for handling different thing, ...
ypeError: Cannot read properties of undefined (reading 'invites') 8 messages
frigid thistle I have a 5k server, I want to make an invite bot for this server, but it doesn't work and commands that work on a 20-per...
autocomplete not working 14 messages
queen glen Autocomplete won't show in discord
transfer ownership from bot to user 3 messages
untold cloud how do you have a bot transfer ownership of a server to a user? I don't know how, but one of my users managed to make m...
DiscordAPIError: Invalid Form Body 30 messages
fierce birch I recently changed my server in codes etc. I did not make any changes, but I am facing such an error and I could not sol...
Get emoji 12 messages
vital scarab How can I get emoji with interaction? If I use ```js const someEmoji = client.emojis.get("id"); ``` I get an error `Refe...
Avatar format 3 messages
vital scarab Why does it give me the format webp? ```js ${user.avatarURL({ format: 'jpg', dynamic: true, size: 2048 })} ```
forum posts closing 3 messages
vague tendon how can I lock & close a forum post?
How do I fetch only user messages, not bots? 2 messages
supple pier When I try to get all messages from a specific channel, I get everything, but I also want to exclude bot messages <:thin...
Idk which error is, the request body contains invalid JSON 4 messages
dusty sapphire v14.7.1
Trying to migrate Discord bot from string to slash commands, error when running deployment script 6 messages
topaz abyss G'day. So, I have been trying to migrate my bot over to slash commands (a bit late but necessary nevertheless). I have w...