All Questions
Tagged with node.js discord.js
8,243 questions
-1
votes
1
answer
45
views
Nodejs Webscoket discord bot authorization
I tried logging in using my credentials, and I expected the WebSocket connection to recognize my session and allow me to stay connected. However, even after successful authentication, the server still ...
0
votes
1
answer
31
views
DiscordAPIError[10062]: Unknown interaction at handleErrors
I'm making a slash command to send a user info about command when they use /showallrole I just get this error please help me to check my code.
this code for show all user in my discord.
C:\bot\...
0
votes
0
answers
40
views
How to serialize discord API button interactions
I am making a JS discord bot that when a command is run, an embed is displayed with a button row underneath the embed. Im having some problems when multiple users run the same command or when the same ...
0
votes
1
answer
58
views
How to handle GitHub updating correctly? [duplicate]
I am relatively new to github and have been trying to program a system for my discord.js bot which would update the bot's code with my private repositories. For that system I have 3 repositories. The ...
0
votes
0
answers
23
views
JSON changes in the sequelize database are not applied
I'm building my discord bot on the Discord library.js and I need to make a resource system. To do this, I decided to use the sqlite3 database in conjunction with sequelize. I use json strings to store ...
0
votes
0
answers
40
views
Timer and Answer Processing Bug in Multiplayer Discord Quiz Bot
Hello everyone,
I’m working on a multiplayer Discord bot for a quiz game, and I'm facing an issue with the synchronization of the countdown timer and the answer processing. The problem occurs when a ...
0
votes
0
answers
34
views
I am getting error when i click on submit button | Discord.JS
Everything works pretty much cool but when i enter second information and click on submit button in modal dialog it gives this error and crashes heres how it looks and how i fill inside of them.
...
1
vote
1
answer
40
views
GuildMemberUpdate event getting oldMember and newMember both false values about roles
My Discord bot uses the GuildMemberUpdate event to validate whether a specific role has been added/removed from users in a server, and based on this, it performs certain actions on a database.
The ...
0
votes
1
answer
44
views
Adding a role to user from client Id string?
I am creating my discord.js bot along side my express.js app and have a validation page that requires the user to submit their unique code generated when they join the discord server, in other words I ...
1
vote
0
answers
34
views
Anyone know why my glitch OAuth2 project is getting ratelimited?
I get a 429 status ratelimit whenever I try to connect to a bot.
I've tried three different bots (Like seriously, I made three bots) and it didn't work... I'm using discordjs v13.0.0 because glitch ...
0
votes
0
answers
26
views
discord.js Error 50001: I dont know what I should do
I saw many post on this error but they didn't helped much.
Here is my error:
DiscordAPIError[50001]: Missing Access at handleErrors (C:\Users\Administrator\Desktop\BOTS\masora_bots\masora_bot\...
0
votes
1
answer
75
views
Discord.js: My code throws "" is not a fucntion error
I am writing a private bot. When I wanted to make a command with option to ping another user. However, when I try to run it i am getting an error:
TypeError: " " is not a function
This is my ...
0
votes
1
answer
38
views
Discord.JS Show Modal Error (Announcement Creation Bot)
I am making a command for my bot that when you the /createannouncement it shows a modal that you can put in the information for. it keeps coming up with an error and also in discord saying "The ...
0
votes
1
answer
77
views
Discord.js message_reference[MESSAGE_REFERENCE_UNKNOWN_MESSAGE] Error
i was creating a command in discord.js and i found this message_reference[MESSAGE_REFERENCE_UNKNOWN_MESSAGE] error. i tried solving it using chatgpt. still not able to fix it
node:events:497
...
0
votes
1
answer
41
views
An error occurred while submitting the modal, something went wrong
I want to ask why, when I run the bot and press submit in the modal, I get the error "something went wrong". Is it possible that I'm using it incorrectly?
I want to create a confession ...
0
votes
2
answers
79
views
How to update existing message and then reply without InteractionAlreadyReplied error, discord js
I have an embed that needs to be updated and then a reply should trigger afterwards. The code takes about 5 seconds to complete so to prevent UnknownInteraction error, I added deferReply(). However, I ...
0
votes
0
answers
33
views
Message Create event not getting fired in discord.js
const { Client, GatewayIntentBits } = require('discord.js');
require('dotenv').config();
// Initialize Discord Client
const client = new Client({
intents: [
GatewayIntentBits.DirectMessages,
...
3
votes
1
answer
93
views
Sharded Discord.js bot resets to initial presence status
I wrote a Discord.js bot in NodeJS that uses discord-hybrid-sharding to spawn my bot.js.
In the bot.js code below, you can see that I have an initial status of "Starting..." and then in ...
1
vote
1
answer
135
views
Pinging a role with discord js v14
I am trying to ping a role with discord.js; not just displaying the role name but sending a notification to all members with the role.
I have tried
await interaction.reply({
embeds: [embed],
...
0
votes
1
answer
43
views
Discord.js fs.writeFile not updating the correct json
I am using discord.js to write a bot. I am using a json called data in order to hold information that can be changed via slash commands. However, using fs.writeFile doesn't modify the targeted json.
...
0
votes
0
answers
55
views
Merge audio streams with ffmpeg in nodejs into one stream seamlessly?
I've been working on a music bot for DnD which we are using as our main source of music in Discord.
Discord is not important as it accepts pretty much any stream.
What i want to achieve:I want to have ...
0
votes
1
answer
47
views
discord.js MessageTyping errer
I was making a discord bot with discord.js, but when I use MessageTyping Intent, I get an error.
Errer:
/home/container/node_modules/discord.js/src/util/BitField.js:174
throw new DiscordjsRangeError(...
0
votes
1
answer
79
views
Discord Bot can't edit its message (discord.js V14)
I'm trying to make a Discord TicTacToe bot that works just by having the bot authorized to your account. I'm using the module discord-gamecord to do this. The bot works fine if it's added to the ...
0
votes
0
answers
17
views
Reaction Collector not collecting reactions in DMs
I am using Discordjs v14.15.3. The following script is supposed to send an invitation via DM to all members who have opted into our coffee chats to confirm that they are interested in participating ...
0
votes
0
answers
34
views
CollectorMessage from Discord.js v.14 with SlashCommands
I got a problen trying to create a command about a "pokequiz" where you have to guess the pokemon's name using SlashCommand and Collectors. When the user types the correct answer, the bot ...
-1
votes
1
answer
93
views
Discord JS v14 Bot Script Not Working (Specifically, GuildCreate and GuildMemberAdd not triggering)
Okay. I've tried everything I can think of here, and I can't seem to find anything that is a similar problem to mine. The closest thing might be this post.
I'm trying to build a Discord bot that can ...
0
votes
0
answers
50
views
TypeError: options.getTextImputValue is not a function
I am trying to create a simple Discord Bot command, where I can create an embed. The problem seems to be in one line, where I want to get description of the embed from a modal. My problem lies ...
0
votes
0
answers
46
views
Nodemon Throwing Errors and Can't Find File
I'm very new to Node.js, Nodemon as a whole, and I've haven't used Javascript in a while. I'm making a Discord bot that send a quote from and array at a certain interval. I put the quotes in a ...
-1
votes
1
answer
45
views
Error: cannot find module './discord.js' on Heroku
This is my first time deploying on Heroku, and I've come across this hurdle that won't let me successfully deploy my Discord bot. I've been following a tutorial, and the creator seemed to deploy his ...
-1
votes
1
answer
527
views
DOMException [AbortError]: This operation was aborted
that error happens but it stops the code then it sends the message to the target channel 3 times
but ig that happens because the audio file big cuz it works fine with the small audio files theres any ...
0
votes
0
answers
50
views
DiscordAPIError[10062]: Unknown interaction randomly popped up
I'm trying to make a discord bot. for a skyblock server, using the commands it will show for example farming level, etc. this code use to work just fine, the next day when I started it I got this ...
0
votes
1
answer
58
views
Discord js Using guild. but this error happens Cannot read properties of undefined (reading 'members')
So I was writing tje code as a test to implement some functionality.
when a user sends a user ID with a command, the bot have to check if the id is on the server or not, but this error occurs Cannot ...
0
votes
0
answers
113
views
Discord Bot modals suddenly stop working using discord.js
I have a discord bot that presents the user with a number of modals reachable through buttons in an embedded message. This has been working for weeks without issue.
Suddenly all of the modals throw a ...
0
votes
2
answers
62
views
Is there a way to check if a specific user id exists within the server? without using cache || discord js
Is there a way to check if a specific user id exists within the server? without using cache
I couldn't find a working code, whether or not the user had never chatted
commands.add('test3', (arg) =>{
...
0
votes
0
answers
40
views
Discord js gives me "DiscordAPIError: Cannot send an empty message" when I put "async, await" in the script
When a user sends a fur file with "$fur2mp3",
the bot has to download it to the local repository,
convert it through an external batch script,
and send the converted file to a channel.
but ...
0
votes
0
answers
21
views
in discord js msg.attachments.first().name,all blank chars are replaced by an underbar, and if the underbar is present at the beginning, it disappears
Sorry my code is dirty
and also I'm not a native english speaker
~
As the title goes, all spaces in msg.attachments.first().name are replaced by underbars and disappear if there is an underbar in the ...
0
votes
0
answers
99
views
Discord API responding with "Request failed with status code 401"
I am developing a discord servers list, the site itself is complete, but I am having major issues ever since switching to slash commands (requirement for verification, unless approved for Message ...
0
votes
0
answers
51
views
Discord Js V14 Setting permissions on channel not working as expected
when creating a channel with the bot i wanted originally to set the permissions for everyone to not see the channel but for a specific role to see it and for the person that used the command to see ...
0
votes
2
answers
51
views
Error : Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'FLAGS') Discord bot Discord.js V14
i just wanted that the bot if i interact with the button it will create a channel on the "ticket" category if there is no ticket category i verify if there is any category with the id that i ...
0
votes
0
answers
27
views
Discord error "Interaction has already been acknowledged"
I'm trying to make a discord bot which will track your hack club arcade sessions, but I am coming across the issue
Error [InteractionAlreadyReplied]: The reply to this interaction has already been ...
0
votes
0
answers
40
views
exported variables always return undefined in discord.JS V14
in events/messageCache.ts:
import { Events, Message } from 'discord.js';
export interface MessageCacheEntery {
authorID: string;
deleted: boolean;
message: string;
timestamp: number;
}...
0
votes
0
answers
31
views
"Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred" I keep getting this error on discord.js v14
I am trying to make a bank command with subcommands "balance, withdraw, deposit and transfer coins", but every time I try to run the command I get the error "The reply to this ...
0
votes
1
answer
53
views
Discord.JS TypeError: Cannot read properties of undefined (reading 'reduce')
Receiving the following error when using any interaction in Discord.js
Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'reduce')
at BaseInteraction (node_modules\discord....
0
votes
1
answer
92
views
Discord.JS Invalid Form Body when creating a select menu
I'm new to menu selectors and I'm not really sure why I'm having problems getting started with it.
I've tried to make a test menu selector to get started.
const menu = new StringSelectMenuBuilder()...
0
votes
1
answer
38
views
How can I not trigger GuildRoleCreate event by adding a bot?
const botMember = await role.guild.members.fetch(executor.id).catch(() => null);
if (botMember && botMember.user.bot) {
return;
}
So Im trying not ...
1
vote
1
answer
55
views
Node.js terminal not usable after running main file
I just started making a Discord bot using Node.js in Visual Studio Code, but I've stumbled upon an issue that I haven't been able to fix.
When I run, for example node deploy-commands.js, the terminal ...
0
votes
1
answer
74
views
How to store a Global variable between restarts with MongoDB
I have a $count command which increases a variable "count" by 1. Every time I reset my bot, the count goes back to 0, because I set it with let count = 0. My issue is that I don't want the ...
0
votes
0
answers
184
views
Error: Cannot find module opus.node - trying the wrong directory?
I'm trying to get an old project working again and after cloning it with no changes from what used to work I've been getting a cannot find module error.
Here is the full error:
Error: Cannot find ...
-1
votes
1
answer
56
views
Discord.js | Bot's role reactions post does not continue to work between sessions [closed]
I'm trying to set up a /roles command for my Discord bot. The goal is to have the bot post an embed with some automated self-reactions that correspond to self-assignable roles identified in the embed. ...
0
votes
0
answers
128
views
Discord bot is not playing given URL
I am working on a Discord music bot powered by discord-player v6.6.10 and discord.js v14.15.3.
Currently, when the user executes the /play command, the bot properly searches for the given URL, grabs ...