djs-questions

9202 threads · Page 114 of 185

Cannot read properties of undefined (reading 'Flags') 17 messages
ornate notch My Code: ```js const { SlashCommandBuilder } = require("@discordjs/builders") const { EmbedBuilder, PermissionsBitFieldB...
Is there a way to send a message when the bot is about to turn off ? 2 messages
high raven I want to send a message kinda like that : "Bot off" when the bot is about to turn off.
client is not defined in interactionCreate.js, but it is defined in main.js 111 messages
spark fulcrum If im not wrong, i dont have to defind it again ;=;
How do I get the number of roles that a user has on the server? 5 messages
ornate notch How do I get the number of roles that a user has on the server?
I tried to repeat the "Registering slash commands" page on discord.js guide 6 messages
spark fulcrum Finally, i could get rid of all the errors, registered the command and then i started the bot, but when i tried to use t...
So, i tried to repeat the Registering slash commands page from djs guide website 9 messages
spark fulcrum (https://discordjs.guide/creating-your-bot/command-deployment.html#command-registration) But something went wrong, i did...
Modifying internal functions 5 messages
mighty birch Is it safe to modify any Discord.js function to add my own code before and after the execution. Example: ```js const def...
Structuring within discord.js 6 messages
torpid slate I am fairly new to discord.js but have quite a bit of experience in web-development. I know that structuring a project i...
env is not grey 2 messages
acoustic prairie When i put my mongodb link in .env it's not fully greyed out because there's a "=". How do I fix this? I suppose I can't...
Trying to receive and log individual responses from two servers. 42 messages
terse star I am using Rcon to remotely connect to two game servers. I have created a slash command for my Discord bot to send whate...
Forum thread tag not working 28 messages
median frost Why doesn't my bot add the tag to the forum thread? ```js const serverId = interaction.guild.id; const foru...
Collector filter editing after creation 15 messages
dawn mica So I have an embed with buttons (panel) and each voice channel has one panel to itself. I've filtered the panel using t...
Why is threadChannel.messageCount possibly null? 2 messages
lucid girder I'm trying to get the count of messages in a forum channel thread but i get the error `threadChannel.messageCount is pos...
What property is display name 2 messages
cold imp Title. What is the property for the proper display name? In my script I ask for displayname but certain users display th...
Guide doesn't match up with my needs. 8 messages
trail thicket I was trying to make a deploy-commands file /w the guide, but then i realized it only works if i "organized" the command...
Getting an error when im trying to node main.js 13 messages
spark fulcrum The code const { Client, Intents } = require('discord.js'); const { token: token } = require('./config.json'); const cli...
An error when i try node main.js, im absolutely new at javascript and i wanna try to do my small bot 39 messages
robust pecan PS C:\Users\User\Desktop\Discord Bot> node main.js node:internal/modules/cjs/loader:1327 throw err; ^ SyntaxErr...
need help with my bot 1 messages
icy sonnet well i think i built my bot around 2021 and got it verified on the djs version at that time, but now i completely shut d...
Message Specific Collector 4 messages
dawn mica So I have a embed with buttons which acts as a panel to control a voice channel. There can be multiple of these panels f...
Edit button for only one user 3 messages
spare barn Hey, I try to update a button after one user click on it. Like, one button say "Join" and after clicking on it, the butt...
Can I ask what are the all errors that can happen when bot DMs a user? 3 messages
woven escarp Title
Getting error TypeError: client.actions.InteractionCreate.hasPermissionshandle is not a function 14 messages
rapid bridge I'm getting the error `TypeError: client.actions.InteractionCreate.hasPermissionshandle is not a function` for some reas...
discord api error 50001 13 messages
ancient thistle ```js const { SlashCommandBuilder } = require('discord.js'); const { EmbedBuilder } = require('discord.js') module.expo...
DiscordAPIError[10062]: Unknown interaction 15 messages
zealous carbon Hello guys, I just updated to v14 version and I'm trying to do a store command using buttons My problem is that when 2 ...
Question about menu builder 2 messages
gloomy flame is there any way to get data from a json file and every one of them as option in the menu?
i need help on fixing this error please 5 messages
998292157150535700
Discord API Buffering edits to embed? 6 messages
deep kindle I have a status embed message that gets edited every 2 minutes with the most accurate information, however it takes abou...
interaction.inGuild() doesn't work as a typeguard 7 messages
lucid girder I'm using TypeScript and i need a typeguard for `interaction.guild` but `interaction.inGuild()` doesn't seem to work. Am...
Error Events 21 messages
wild raptor I have the channelUpdate event that has been executed when mee6 has updated the roles to a user and that should not be a...
How do I use Client.updatePresence()? 22 messages
shut belfry The core library's Client class has an `updatePresence` function, how do I use this?
998292157150535700
execute function not ending after return statement? 11 messages
finite fox Hello, I have the following `assign.js` command that I am trying to use to assign a targeted user to a specific team, wh...
hi ı update my bot v12 to v14. my bot online but not working. what is the problem 106 messages
high ether hi ı update my bot v12 to v14. my bot online but not working. what is the problem but dont came error in console
errorhandler 2 messages
hasty forum Heyo peeps! I was wondering if anyone had tried creating an error handler that would catch every type of error and log ...
guildCreate 2 messages
jaunty crescent is there a way to check who invited the bot to the guild without using auditlog?
How to begin with Discord js 2 messages
fallen glade Hi I am absolute Beginner in discord js i explored with documentation provided by the server but i am too beginner don't...
User Content 2 messages
median hamlet How can a userContent be made visible/usable to a certain position or to everyone without having to manually modify the ...
How can discord.js cache all users, channels, guilds into Collection? 12 messages
plain lily Title
Command Handler Issues 18 messages
mortal hemlock I would like to use my command handler to execute this code whenever someone types a message in a specific channel. This...
Image still shows 33 messages
naive python Hi, I have the following code as an update to a previous interaction, as you can see, I have set the files: [] to an emp...
Banning doesn't delete msgs 13 messages
compact walrus I have made a ban code and will attach the important part below. The problem is that when I use the code, it bans the us...
does any one know how to get discord to display your bots command for auto complete 16 messages
meager glacier hello I just finished coding my bot and i want to make it so that when you type the commands can be auto filled with tab...
slash cmd doesn't work 18 messages
neon flame hey! i have recently created a bot, but the ping slash cmd don't work, can you help me?
Deferring ButtonInteraction response and then update 6 messages
lucid girder I have a message with two buttons and i want to update the message after one has been clicked, although the operation pe...
get "Global display name" 3 messages
jade vector Hello! Since the discord update, discriminator disappear, and we have now the option to set a "global display name". For...
Expected a string primitive 14 messages
south surge Keep getting this from my embed fields input.value | | ValidationError > s.string | | Expected a string prim...
Cannot read 'edit' 4 messages
supple pumice I cannot resolve this error, pls help me to fix it. ```javascript … collector.on('collect', i => { if (i.customId ...
Pass variables into <ShardingManager>.broadcastEval 4 messages
weak narwhal I have this code: ```ts const params = { guild_id: "", channel_id: "", shard_id: 0 } // @ts-ignore const result =...
Embed interaction replys 5 messages
cobalt perch How would I go about doing embeds in interaction replys (slash commands)
Embed Help 16 messages
burnt niche Can someone tell me why this doesn't work. ```const { EmbedBuilder } = require('discord.js'); if (message.content =...
ReferenceError: client is not defined 18 messages
lime shore I have followed the guide on "https://discordjs.guide/#before-you-begin" and when I run the code "node deploy-commands.j...