djs-questions

9202 threads · Page 148 of 185

Bot cannot manage roles 8 messages
jagged flame My bot is not able to manage the roles of users. Currently have a check to see if the bot has the permission of `Manage...
Can't find documentation for Events 5 messages
vernal wharf I've run across this a few times now where I find examples in the documentation that mentions things like `Events.GuildA...
Interaction Question 9 messages
lilac quail the interaction is too late to reply, the bot gives an error, but I still want to respond to the interaction, what can I...
Channel does not have send method. 8 messages
jagged flame Trying to just get my bot to send a message in a channel but `.send` is not a method on my channel variable. Code (using...
Ping command help - Beginner 29 messages
compact walrus Hi. I am just a beginner in discord.js. I have done some projects in discord.py. My problem is that, I cannot get heads...
Manually runnable scripts 21 messages
prime turtle Is there a way to simply make a script which does not correspond to a command nor an event, which you just run manually ...
Embed GIF failure 19 messages
tawny jetty I'm trying to embed a GIF within a deleted message using that message's JSON. If I use .setImage() with the url, the GIF...
Make dropdown not get selected 41 messages
fiery mulch Hello, I have a StringSelectMenuBuilder and I need to make it not to get selected when someone clicks it. Thanks
adding select menu row to command with buttons? 55 messages
steel agate how do i add the `select` row to the command so it displays along with the buttons? <https://sourceb.in/uXoEK0ni1s> idk ...
Why can I not send a message in channel when it isnt null 5 messages
torn cipher Hello, I am trying to use this code: ```js const channel = await guild.channels.cache.find(async (channel) => channel.ty...
i had an error```json throw er; // Unhandled 'error' event ^AbortError: The operation 47 messages
cunning egret <:meguFace:485155746489565194>
removing attachment from embed when there’s no attachment set for it 7 messages
steel agate I have a problem that I hit but idk how to fix it. Basically what I did was add if statements to my `sourcePages()` func...
Track Status bot 5 messages
winter flax This code only track one bot status only, if i want check 2 bot in 1 embed. So i add ```const user1 = guild.members.cac...
Is it possible to retrieve server member profile info? 17 messages
hollow cloak I'd like to create a function that forces Discord server nickname to match Twitch username upon entrance to a server
Radio music 4 messages
quasi latch My bot is playing music from an online radio station, but the music stops playing after like 30 seconds. I thought it wa...
What's the difference between GatewayIntentBits.Guilds and using 'Guilds' 45 messages
mint hollow in discord.js v13 i can see it was Intents.FLAGS.GUILDS in discord.js v14 it's changed to GatewayIntentBits.Guilds but.....
Stats of a server 12 messages
fallen gulch I want to make server stats in a voice channel and I've tested this code but nothings wrong it jus wont work and I'm loo...
Getting TextInput Value 8 messages
night needle https://pastebin.com/gcKrBWYA Line 191 and down is where I am having issues, it keeps saying fields is undefined, but I ...
API ERROR 4 messages
craggy prism Hello, my Discord bot is installed on a physical machine. When I run it on my local computer, I don’t get any errors. Ho...
Message Attachment 6 messages
winged edge Hello, how can I send file attachments? I have the following code: ```js const attachment = new Attachment( ...
event handling for messageCreate 15 messages
eternal shoal I have been setting up event handling as shown in the guide https://discordjs.guide/creating-your-bot/event-handling.htm...
Trying to send a message in a specified channel 8 messages
vagrant ridge It is kind of hard to explain, so, here's the thing. I have a modal and I want the contents of the text input fields to...
Button interactions not working after 15 minutes 5 messages
hybrid imp I have a command where it sends a confirmation message with confirm and cancel buttons on the original message. When cli...
Sharding 2 messages
last relic What is a shard, what does a sharding do? And why use shard instead of not? Just some questions i have
timeout modal 32 messages
formal snow when i submit my modal it times out and says "something went wrong. try again" but it still runs all the code that i has...
Trying to create a guild event resolves in an error 15 messages
edgy matrix I created a function to create a guild event. The channelId is defined as `const channelId = '1087749531078238315';` an...
how to create guild channel? (djs/rest) 3 messages
lethal spire This is supporting create channel?
998292157150535700
community events 19 messages
edgy matrix I am trying to create community events with my discordjs (14.8.0) bot. I found this method: https://discord.js.org/#/do...
Trying to remove reaction from user if they exceed maxvotes allowed 28 messages
vast cloud Here is my code votes are counted but users can vote as much as they like for some reason ```js const...
How to create a channel ? 4 messages
junior widget I wrote some codes but it always shows ```Cannot read properties of undefined (reading 'guilds')``` But i defined it at ...
Bot doesn't receive commands 4 messages
strong forge So I'm making a bot and I've not used discord or node in a while as I've been sick for a while, stayed away from develop...
My bot doesn't create the button 7 messages
ancient yacht My bot is connected but the button is not created when I start the bot, could you help me please? I'm using discord.js 1...
Unarchive thread error 16 messages
gloomy flame I used to make a thread system but when i try to unarchive a thread i got error saying canno read properties https://p...
help with this code 5 messages
eternal lodge ``` const Discord = require('discord.js'); const client = new Discord.Client(); const fetch = require('node-fetch'); //...
User ID awaitMessageComponent 4 messages
limpid vector How can I use awaitMessageComponent for a user channel. Referencing the channel is the issue I guess. var curUser = cli...
Coding in Intellij 10 messages
prime turtle Hello there, I wanted to switch from VSCode to Intellij but it shows some warnings. I'm kinda new to Intellij so I was w...
How can I edit channel description? 8 messages
small tide I want to change it
Status Bot 5 messages
winter flax ```js const { Client, GatewayIntentBits, EmbedBuilder } = require("discord.js") const discord = require("discord.js") co...
Button Collectors Explanation 4 messages
limpid vector Can someone please explain to me how button collectors work, i tried to read the documentation but I didn't understand i...
Type error with ActionRowBuilder 3 messages
minor parrot ```ts const buttons = new ActionRowBuilder() .addComponents( new ButtonBuilder() .setCustomId('primar...
Collector 10 messages
night needle ```js collector.on('collect', async i => { const selected = i.values[0]; await i.update(`You selected ${selected...
No sound on raspberry 22 messages
tropic sapphire hi everyone, has anyone heard of a bug where discordjs doesn't play any sound (without logging errors) ? I happens when ...
Can I block certain gateway events from reaching my bot's client? 3 messages
limpid pagoda I am running on *extremely* weak hardware, and being sent the threads list from a certain server causes my bot to OOM. I...
Discord.js client.on('ready') imported from another file not working 7 messages
velvet breach ```ts //Client.ts export class ExtendedClient extends Client { commands: Collection<string, CommandType> = new Colle...
My bot does not respond me 2 messages
inner pendant i experience issues with running my bot in node.js (the code example with ping command doesnt even run), currently its j...
Raw events 12 messages
sterile relic Hey gang, I'm running a custom implementation for my discord bot. However, I'm dealing with libraries that I would reall...
Unknown application command permissions 3 messages
quasi latch When I run this code: ```js guild.commands.fetch().then(commands => { commands.forEach(command => { command....
Cannot use 'in' operator to search for 'default_member_permissions' in undefined 26 messages
gaunt compass I get such an error, but there is no code that I have written in this way. I do not understand the source of my error.
How can I link a function and execute only that function in a file (exporting/importing) 2 messages
ancient thicket I tried everything. Module.exports = function and then the function I want to execute. Maybe I did it wrong where I defi...
guild.members.fetch() limit 9 messages
covert storm The discord API documentation states the limit for fetching guild members is 1000 (reference: https://discord.com/develo...