djs-questions

13317 threads · Page 152 of 267

How to get bot permissions for a TextChannel ? 2 messages
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 7 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 9 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...
role permissions not working 2 messages
how to create guild channel? (djs/rest) 3 messages
lethal spire This is supporting create channel?
@discordjs package
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...
How to hide user's answers 9 messages
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...
[TypeScript] Non required option for slash commands 19 messages
pulsar fulcrum Hello ! I wanted to know, I rewrite my bot with TypeScript and I have a problem. When I want to get the value of non-re...
Custom Status = Role V: 12.5.3 24 messages
Bot doesn't respond 9 messages
ancient yacht Hi guys, My bot is online but doesn't respond to the command !hello. I've tried many different codes and the bot never...
move user into another text channel 12 messages
novel inlet Is there a way to do so? Only text channel, not voice. I need to move user into the newly created ticket once they press...
Channel Slowmode 4 messages
warped aspen Hello, how do I add the slowmode to the channel configuration when I am creating it?
event guildDelete 7 messages
gaunt wedge after upgrading to 14.8, I noticed a strange error every time I was client ready the bot, the `GuildDelete` event has tr...
DiscordAPIError[30034]: Max number of daily application command creates has been reached (200) 12 messages
naive barn discord api error