djs-questions

9202 threads · Page 156 of 185

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 9 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'...
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? 3 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...
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) => {...
interactionCreate, and interaction.update with interaction.showModal not working :( 7 messages
humble ibex Hi, I have a small question about the code itself, so I'm learning bot programming, everything is fine, except for one o...
What can cause FetchedThreads.hasMore to be true? 20 messages
livid cape Does GuildChannelManager.fetchActiveThreads have a limit or will it always fetch all threads? FetchedThreads.hasMore exi...
When will the library become ESM? 17 messages
barren cobalt It makes it very difficult to write in typescript with commonJS. It would be nice if the library would support ESM since...
Cannot use discord-api-types V10 5 messages
velvet goblet Hi, I was making a command that I wanted to only be usable by those with admin permissions, and I set the permissions on...
998292157150535700
Bot not responding to the command input 22 messages
kindred flint when i type ping it doesn't respond to pong i have the example from discord.js.org i tried even v12 discordjs and the la...
Voice channel reactions 4 messages
queen glen Is there a way for me to detect when a user uses reactions in a voice channel. Not the chat in the voice channel. Some k...
Trying to make a command that replaces all the channels and categories in a discord 4 messages
tropic bane Error: Cannot access value before initialization
How to fetch all online users in a guild, including idle and dnd 14 messages
gloomy bear See title Code: `guild.members.cache.filter(member => member.presence?.status === 'online' && !member.user.bot).size;` ...
Roles being added back are more than provided? 48 messages
dull wing Im literally removing all specific roles, and readding only two.. but for some reason its adding 4 back??? this doesnt m...
Error - ExpectedValidationError: Expected 7 messages
worthy trout Full error: ```js throw this.error; ^ ExpectedValidationError: Expected at InstanceValidator.handle expec...
Searching across multiple criteria using Javascript and MySQL. 3 messages
stark horizon Hi! I created a Customer database using MySQL and Javascript. Five types of searches can be made in this database. For e...
How to add a type for StringSelectMenuBuilder 13 messages
tiny flint So I'm trying to add `ComponentType.ChannelSelect` to a `StringSelectMenuBuilder` but after looking at documentation, I ...
InteractionCreate and MessageCreate do not work 27 messages
short vigil I was trying to recreate the code in the welcome section of the documentation but then realized that for some reason 'in...
How do I get the bot to do something through a regular javascript method? 9 messages
near tangle Instead of using "client.on()" I wanted to use a regular method to get the bot to perform an action. This is because the...
slash command string limit 6 messages
queen glen Is there a limit to how many characters I can put in a slash command string option?
mousehover on an interaction property says any vscode 15 messages
median sedge How to fix?
How to stop users from using bot commands in their dms? 10 messages
rare snow I know I need to do something in interaction-create.js but I dont know what.
Unknown Webhook 5 messages
plucky relic So i made a message with a close button and if the close button is clicked I want that the message is deleted. This is m...
Error when trying to get role 97 messages
soft stone Hi, I am currently developing a discord bot for a discord server. Even though this isn't the first discord bot I am deve...
ChatInputCommandInteraction.deferReply() & .editReply() w/ different ephemeral property value 8 messages
patent panther the way ive learned to handle slash commands is to defer the reply as soon as possible if i am going to do something asy...
reply with message id 13 messages
patent root is there a way to reply a message with the message id? for example, using a command for pre-written responses that takes...
try & catch errors 7 messages
tall whale Should I put a try catch on the entire bot, so if something throws a random error, but bot won't crash? Or it's not some...
discord.js v11 3 messages
primal ember I am working on a bot using eris and discord.js v11(I would rewrite but it's not my bot). I am trying to load an attachm...
New to v14 18 messages
thin elk I came from v12.5.1 and i'm trying to update my code to v14. What happened to `client.on()`? This is an example ```js cl...
Cannot read properties of undefined (reading 'find') 7 messages
tawny vapor Working on a giveaway cmd and I keep getting this error but idk how to fix it so I was wondering if someone can help me
Is there a way to write pre-revealed spoiler text 4 messages
simple pewter Like ||this|| but it would be revealed