djs-questions

13317 threads · Page 160 of 267

Anyone know of a website where I can find a list of every feature possible of a discord bot in js? 4 messages
dev release
FileNotFound error 2 messages
bright island I'm getting a FileNotFound error from discord.js, doesn't show where in my code it's calling whatever is erroring so I h...
How to create webhook using SlashCommandBuilder() 15 messages
eager patio hi, i want to know how i use/create webhook by using slash command or if it is possible. i already have a command with i...
dev release
How to get a full channel from an interaction option 6 messages
brisk nacelle I'm trying to get a channel from a ChatInputCommandInteraction, but the typescript type is only partial for some reason,...
Null Properties of an Invite 2 messages
grim kraken I'm attempting to read some properties of an invite, but they return `null` when the invite is deleted. I'm logging the ...
Mongodb not showing warnings correctly 4 messages
hasty mica So I created a warnings command to show all user warnings with mongodb. Although I clearly have warnings the bot is tell...
make button disabled for one user only 9 messages
granite aspen I want it so when a user clicks on a button in a message, the button they click on is disabled / not clickable anymore f...
Is there a way to show modal on a ModalSubmitInteraction 5 messages
dawn thistle I know that there is no function "showModal" on this type of interaction but I would like to know if there is a trick th...
data.limitSpotify -= 1 substracts 2 instead of 1 (MongoDB) 2 messages
dawn zephyr Hey, When I want to limit the user so he can only use a command 10 times, the bot substracts 2 of the user's limits, ins...
Mongoose neither stores data nor sends error message 5 messages
Sending a text attachment 5 messages
digital nova How can I upload and send a text attachment in discordjs?
"Cannot find module './_chatInput/attachment'" 7 messages
exotic jewel i'm attempting to run my bot on `Ubuntu` but this appears, how can i fix this??
roles.add acts like roles.set 24 messages
steady talon Hiya, I'm currently using Sapphire as a framework, but for the listeners `guildMemberAdd`, it checks a database for the...
Creating a Embed Slash Command 10 messages
zenith cove I'm trying to create an interactive slash command to send a embed. The idea was to have the command which would have ei...
How to defer an interaction.update? 10 messages
fallen dome Hi, i've a command respond with a simple interaction.reply and then using the attached select menu there is a further in...
How I set a character limit on a string option 6 messages
safe haven Pls I need help I want to limit to 30 character the option User
Cannot read properties of undefined (reading '_add') 38 messages
muted beacon I am currently encountering the error (see screenshots), I have found references to something similar in the following g...
change message author's name & icon 15 messages
patent root i want to change the display name and icon of my bot in specific messages, but i'm having trouble changing it i tried u...
Is there a way to get the interaction where a modal was created? 6 messages
gusty bramble How would I go about getting the interaction from where the modal was created? I need the interaction where I sent the m...
client missing intents 8 messages
finite pier a little help pls: ``` throw new DiscordjsTypeError(ErrorCodes.ClientMissingIntents); ^ TypeError [ClientMi...
Trying to make music bot and having errors with the queue 14 messages
dim acorn The bot will play songs but yesterday it just stopped working and im not sure why, it is supposed to say when the song s...
checking voice channel 13 messages
solemn bridge i can not check if the user is in voice channel or not , Here is my code : client.on("messageCreate", async (msg) => { ...
message.content doesn't contain anything when MessageCreate fires 4 messages
ocean sky In the last week I returned to Discord.js. I made a simple code that sends back your message. The problem is that when i...
RoleSelectMenuBuilder 10 messages
digital nova How do I set the roles available in a RoleSelectMenuBuilder? There's no .setOptions method it seems
How are db handled with Sharding? 7 messages
golden nova For example, Im using mongodb to store data per guild. When sharding takes place, and is a separate server per shard, is...
How to create commands with "alternative" names 12 messages
edgy dune For example, Arcane has /rank and /level, both of which do the same thing. Right now, I'm just having two identical comm...
Webhooks and messages 78 messages
frank crystal Hello, I am trying to make a Webhook using the bot (This is my first time dealing with webhooks) I have made (I do not w...
Permissions for Slash commands option 6 messages
dull wing Are there a way to register as slash command option to only specific members? i.e I want the command itself to be for ev...
Please Help 10 messages
zenith coral This is the code: const file = new AttachmentBuilder(Buffer.from(fileContent), 'owner.txt'); ...
Attaching Multiple Images from their URLS 7 messages
flat adder I need to send a message attached with multiple images. These images I get as URLs from an object array. My best guess f...
Event Handler 36 messages
stark atlas I've been following the guide and the bot worked fine until I moved everything index.js: ```const fs = require('node:fs...
Timeout.js not working and giving Type Error 13 messages
hasty mica So I want to create a timeout command for my bot, however I get this Error Message: ``` Promise { <rejected> TypeErro...
installation bot problem 5 messages
elfin talon I downloaded a folder containing javascript files to install a vinted bot. The problem is that I can't install it and I'...
bot goes offline but no errors? 15 messages
Distinguish between bot and user reaction 3 messages
steel fossil I've just created a listener on the "messageReactionAdd" event. I also made the bot add two specific reactions and disab...
Discord bot backup bot 18 messages
turbid rover Hey, so I have my main bot running on a vps, but it has some features that I need Guaranteed to be running at all times....
Prefix stdout with ShardingManager 3 messages
tired field Is there a convenient way e.x. in the sharding manager to intercept the process stdout/stderr from each shard and prefix...
I need someone to tell me what is wrong with the code so that it works, is it possible? 4 messages
dreamy quarry Here is the error it returns to line number 4
<Interaction>.awaitMessageComponent().then(inter => {}) value "inter" is typed as unknown 14 messages
dry bough Does anyone know of the correct typings so that I can typeguard the message component collector so that I am not throwin...
Problem with create Slash Command 14 messages
cursive knoll Hello, I have problem for create slash command with Discord.js I have 2 bots 1 slash work but other no work.. I just m...
Problem with ticket system 8 messages
cosmic nexus ```ts // Node.js Params const fs = require('node:fs') // Discord.js 14 Depends const { EmbedBuilder } = require('@disco...
How to edit a embed field directly? 2 messages
tacit osprey I have a embed message with some fields and I want to update only one like i were using .setTitle('title') but on fields...
Revoke "Add Reaction" permission in a channel 20 messages
steel fossil Hi, everyone I'm trying to revoke the "Add Reaction" permission for the 'everyone' role in a specific channel. I current...
Getting guild members on a sharded bot 15 messages
graceful lodge I want to check if a user is present in a guild on the `userUpdate` event im doing this ```js client.guilds.cache.forEac...
Using Discord.JS in a cloud function 4 messages
normal grove I would like to push a message into a discord channel on some events using a cloud function. I've seen that DiscordJS is...
Does the guildAuditLogEntryCreate event work on v14? 4 messages
surreal remnant As the title states, I am curious if this event that was recently announced for v13 also works for v14. I have gave my b...
guildmemberadd not working 17 messages
How to have cooldown on commands based on conditions 10 messages
edgy dune Basically, I want a cooldown on the command if the user lost, but not if the user won(which would be a bool).
"Missing access" error while adding a role (bot has all permission) 35 messages
tulip otter Here is the error I got ```DiscordAPIError[50001]: Missing Access```, my bot have the admin role, is in the highest rank...
Deleted 5 days after the last post in the thread 9 messages
sharp thorn I tried code like this but it didn't work. ```js var thread_counter = {} client.on("threadCreate", async (thread) => {...