djs-questions

13317 threads · Page 45 of 267

Hello sorry im new to this but did i do this right 100 messages
mental granite ```js const { Client, Intents } = require('discord.js'); require('dotenv').config(); const client = new Client({ in...
Help with GuildRoleDelete Event 10 messages
primal hinge ```js module.exports = { name: Events.GuildRoleDelete, async execute(role) { try { // Fetch ...
system log paypal 13 messages
tawdry bane Hello, I'm trying to set up a PayPal payment logging system on Discord using Discord.js v13. I've found some information...
node
Removing and adding roles at the same time 18 messages
spring jolt Hello, I am trying to remove certain roles and then add other roles to a member once a command is used. The issue is th...
prefix 7 messages
hexed dust Helo Is it possible to create orders with a custom prefix?
channel permission change 69 messages
mint pilot I'm a beginner. If you don't mind, please teach me.
node
getString() issue 3 messages
lucid star ```ts export interface CommandOptions { name: string; description: string; type: ApplicationCommandOptionTyp...
node
problem with the bot 22 messages
tawdry bane Hi, Until a week ago, the bot was working fine, but now I'm experiencing some issues. For example, it repeats certain m...
node
Running commands asynchronously 33 messages
timid hamlet I have a script that uses puppeteer to webscrape different URL's based on user's choice. I wanted to know if there's a w...
cannot find the text input value 5 messages
astral drift https://sourceb.in/oId6V4Tfp0
node
Duplicated commands (not global) 8 messages
pliant void im starting out with a very basic command ping-pong! when i use deploy-command.ts script multiple times, i see the comma...
TypeError: Cannot read properties of undefined (reading 'send') 39 messages
hidden dust with settings.channel being a channel ID ```const channel = client.channels.cache.get(settings.channel) channel.send("e"...
node
i can still fetch the message 4 messages
normal laurel ``` const ticketMessage = await ticketChannel.messages.fetch(data.messageID); console.log(ticketMess...
Error while adding option to command. 8 messages
static skiff Whenever I try to add an option to my command, it breaks. Can anyone tell me why? My commands: ```js var modCommandsLis...
node
TypeError [ClientMissingIntents]: Valid intents must be provided for the Client. 20 messages
hidden dust This is what i have in my file : ```const fs = require("fs"); const mineflayer = require("mineflayer"); const Discord =...
node
Problem while creating category 37 messages
split finch i have a problem while creating channel is specific category. Sometime one of the two category i'm creating (the first o...
node
is there is a way to make down menu never expire? 13 messages
lean owl code
reaction leaderboard 8 messages
exotic marsh making a leaderboard for reactions, i wanna store in a json file the points , each point correspond to the emoji. Now i ...
node
Slash commands are not registering 4 messages
still arch Hey everyone, I am having a problem with slash commands registering in only one guild. I managed to register one slash c...
node
Interaction + Reaction collector 3 messages
brisk lintel I'm trying to update some code. I move from messages to interactions. My bot adds the emoji but does nothing when I add...
How can I check if a user id has permission to send messages to a channel? 11 messages
silver venture Hello, I am trying to check if a user has permission to send messages to a channel like this: ``` const canSpeak = chann...
Interaction already replied issue 14 messages
midnight sonnet ```const { MessageEmbed } = require('discord.js'); module.exports = { name: 'flightlog', description: 'Log a flight...
Failed to load slash commands 32 messages
slow trout const prefix = 'K.'; client.commands = new Collection(); const readCommands = (dir) => { const files = fs.readdirSync(...
tsconfig module 2 messages
bun
button interaction failed (collector/interaction create?) 56 messages
grave stone Hello, I am trying to setup a ticket bot by using collector, my ticket_create button works very well, however my interac...
Cannot read properties of undefined (reading 'getUser') 9 messages
shut spindle Hi I need to take the OWNER string of this code and put it on the interactioncreate event, however it gives me error "Ca...
Unknown Integration 13 messages
node
Forum tags - Create a new tag if not exists 3 messages
jade vector I try to create a new tags in a forum if the tag exists: ```ts const availableTags: GuildForumTagData[] = allTags.map((t...
The reply to this interaction has already been sent or deferred. 39 messages
shut spindle Hi I have a problem. When I run the command "/partnership" "owner..." it gives me the error "Unhandled promise rejection...
node
How to send custom emoji in embed description 12 messages
junior widget ``` const eventtic = new EmbedBuilder() .setColor('#AC00FF') .setTitle('Booking us') .setDescription('...
node
guild.members.fetch will still fetch those who have left the server 17 messages
silver venture Hey everyone, I am trying to make a simple function that checks if a user is in a server. ``` export async function user...
Sending attachment with message edit 16 messages
warm charm Hi guys, I need a hand i'm struggling af. I took a 2-4 month old code, added webpack and update libs, what worked befo...
node
I need help with my code 33 messages
tender moat it send ```C:\Program Files\nodejs\node.exe .\my-discord-bot\index.js Uncaught TypeError TypeError: Cannot read properti...
What are `idHints`? 8 messages
chilly silo Question is clear when registering slash cmds or making them
Unknown Interaction 33 messages
midnight sonnet for some reason I keep getting this error when trying to run a command, this only happens sometimes. ```DiscordAPIError:...
Sychro problem 12 messages
pearl egret I'd like to know a little more about automatic rate limit management with Discord.js For example, if I make a function ...
messageCreate event 3 messages
lilac hull Does messageCreate event affect the bot stability because it get called every time a message got sent ? And is interacti...
Message interaction is null 4 messages
clear blaze is there still a way to get the interaction associated with the message? Because i have a bot where if you use a slash ...
I am confused with interactions 24 messages
lapis grail How I can create a script that switch the message with interaction.update there is a "edit" message I don't like to show...
Guild member caching 5 messages
tired field What is the default behavior for guild member caching? Are guild members swept at all by default? Basically, if a bot h...
Everything executes fine, but then it crashes 6 messages
ionic mulch I was having an issue ages ago where the code after the interaction.reply was being run twice, then it just randomly wen...
"The application did not respond" 28 messages
halcyon rampart I don't understand what is wrong. I have followed what https://discordjs.guide/ says, and it doesn't work. I have search...
Code organisation 7 messages
misty sierra Does discord.js have a feature like `Composer` in Telegraf (the library to make Telegram bots)? I don't think so (or at...
Chanel Creation 21 messages
gloomy flame any idea why dont creating channels but no errors?
Images randomly not loading 9 messages
quasi latch I have a code to log removed images. However, sometimes the image is displayed correctly, and sometimes it's just not sh...
Can't upload emojis: TypeError: terminated 3 messages
glad canopy Hi, when I try to upload emojis using a URL, it works fine locally but not in production. ```js await guild.emojis.crea...
bun
Is there any method that i can use 26 messages
lapis grail to update my embed message? I hope I describe my problem right. I send a embed messege in a channel and then the bot res...
How do I create a native Poll? 6 messages
Undici timeout errors 3 messages
outer cargo Hello! I have a Anti-Nuke bot which is in around ~1300 servers and I have recently started getting connection timeout e...
node
Registering slash-commands 3 messages
vernal prairie why when i use server registering its all okey BUT when i left `GuildID` it crushes