17,178 questions
1
vote
1
answer
41
views
I'm trying to dynamically import a js file in vercel but it keeps saying file is non existant even tho it exists
The file literally exists but i keep getting this error.
Error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/var/task/interactions/selectmenus/help/index.js' imported from /var/task/handlers/...
0
votes
0
answers
13
views
How to replace client or interaction when getting a channel's id?
i just put all my events into event files, but now i got a problem: my "memberAdd" event was supposed to send a message in my welcome channel. I was using the command client.channels.cache....
-1
votes
0
answers
26
views
Role specific daily command for discord js [closed]
I am reaching out as I have a daily command pre-made but I want the daily command to require a role that is made in discord but I don't know how to do this. If anyone can help I would be very grateful....
0
votes
0
answers
40
views
ModalBuilder throws “Received one or more errors” when using new v14.25.1 modal API (LabelBuilder, addTextInputComponents…)
I'm currently working on my first modal in a Discord bot using discord.js v14.25.1, and I’m trying to follow the latest documentation (which includes the new LabelBuilder, addLabelComponents, ...
1
vote
0
answers
48
views
Pixelit JS Library - Incorrect Size
I have already submitted a question regarding Pixelit, see this question for background info.
Long story short, I'm making a Discord bot as a learning project and I am just trying to use Pixelit, an ...
3
votes
1
answer
93
views
How do I use Discord.js and Node.js to send an image?
Preface: I truly don't have a clue about anything related to node.js, this is a learning project for me. I do know some Javascript.
I followed this youtube tutorial to begin a node.js and discord.js ...
2
votes
0
answers
68
views
[email protected] timeout is not a function
I have this code
private async internalExecute(guild: Guild, author: GuildMember, targetId: string, minutes: number, reason?: string): Promise<void> {
targetId = this.baseBotUtils....
0
votes
1
answer
54
views
voiceStateUpdate oldState Channel ID always null
I would like to add a join-to-create function to my Discord bot, whereby a temporary channel is created when a user enters a specific channel. As soon as the user leaves the channel, the temp channel ...
0
votes
0
answers
109
views
Creation and Submission Handling for New Modal Components for Discord.js
I see that discord have released the new modal components to enable select menus in modals and the documentation for discord.js version 14.22.1 seems to indicate that they are live with the update ...
1
vote
1
answer
62
views
Discord.js "guildMemberUpdate" event only fires the second time i change a Nickname
The Issue:
I wanted to create a feature where the bot sets a certain prefix before the Nickname fitting my discord server theme if a user decides to change it. I'm allowing the users to change their ...
2
votes
1
answer
48
views
Unable to convert data of Discord Command to JSON
I'm trying to create a discord bot with a slash command. I already verified that the command does exist, by running console.log(client.stores.get('commands'));. However, when I tried converting the ...
1
vote
0
answers
98
views
How to Get the Option Names in Discord.js
Inside the Register Command File
I want to assign credits to each action using the value parameter and ensure that users don't select the same action multiple times. However, since value is not a ...
-1
votes
1
answer
86
views
How can I make a bot command to perform an action with another user? [closed]
I want to perform an action using a slash command, for example /hug @dean and then have it mention this user and send a message in an embed that should be random.
What I tried either doesn't get a ...
1
vote
1
answer
266
views
Discord API returns 403 'internal network error' (Code 40333)
I am developing a Discord bot using Google Apps Script. The bot's primary function is to post an approval message as a reply in a channel and then immediately add a '👍' reaction to its own message.
...
0
votes
0
answers
35
views
Lavalink always returns loadType "error" for search requests in Discord.js bot
I’m running a Discord.js v14 bot with poru and a self-hosted Lavalink node. Whenever I invoke my play/search command, Lavalink connects successfully but immediately returns:
[Play Command] Search ...
1
vote
3
answers
89
views
TypeScript function overload
Why does TypeScript tell me "This overload signature is not compatible with its implementation signature"?
import { Client, ClientEvents } from 'discord.js';
class MyEvents {
execute: (......
-1
votes
1
answer
58
views
Discord bot /interactions commands structure definition
I am creating a Discord bot to collect user information when joining a community by prompting the user to provide the required profile data.
I have the following command:
const JOIN_COMMAND = {
name:...
0
votes
0
answers
38
views
user app get request returns 403 even when authorized
with the code
const res = await fetch(url, {
headers: {
Authorization: `Bot ${DISCORD_TOKEN}`,
},
});
if (!res.ok) {
const data = await res.json();
console.log(res.status)...
0
votes
1
answer
114
views
Discord.js: Trying to register commands globally across DMs. Commands show on Servers and DM with bot, but not on other DMs
I'm trying to get a Discord bot that has convenient commands across people's DMs (Like ESMbot). I coded it with the Discord.js module. However, I tried registering the slash commands and it appears on ...
-2
votes
1
answer
43
views
Discord NodeJS Show Modal When Validation Fails
I've been trying to get a new modal to appear with the same content after validation fails. In this context, I've wanted to force the user to input a number. Since it seems there's no way to do this ...
0
votes
1
answer
47
views
DiscordJS Bot AudioResource Null
My discord bot connects to the channel and the Audio Player state is "playing" but the Audio Resource is null even though it is routing to the path correctly.
async execute(interaction) {
...
0
votes
2
answers
224
views
Why does the "ready" event on, but the bot isnt working
This code isnt working, its the correct token, but it doesnt work, Why?
console.log("Beep! Beep!🤖Bot Pending!")
const Discord = require("discord.js")
const client = new Discord....
-2
votes
1
answer
65
views
discord.js: the bot isnt loading my function (login) even tho i made it very clear in the code what to do ( typeError ). how to fix this? [duplicate]
I tried so many different approaches, both in the index.js file as well as in login.js and loginAluno.js, but the login function always shows errors, and I get the following error:
TypeError: ...
2
votes
1
answer
329
views
How can I use Discord.js Client with Next.js v15 Server Actions?
I am currently just trying to create a server action in my next.js app to use a Discord Bot of my own making to get member profile pictures. I have the following server action coded in my application
'...
0
votes
0
answers
70
views
Command Return; "The application did not respond", but there was no error detected
config-suggestion.js
const { SlashCommandBuilder, ChatInputCommandInteraction, ChannelType } = require('discord.js');
const GuildConfiguration = require('../../models/GuildConfiguration');
module....
0
votes
1
answer
71
views
can you help me with my button discord js
My button doesn’t work when there’s pagination, so I added one in the Vanguard case with pagination but now it errors out:
D:Kaze\Nouzen\node_modules\discord.js\src\structures\interfaces\...
0
votes
0
answers
50
views
How can I write a discord.js slash command to query a MySQL database?
I'm quite new to discord.js and js in general. I haven't been able to figure out how to let a user execute a command to query a MySQL database.
In my index.js file, I've been able to successfully ...
0
votes
0
answers
54
views
Slash Commands Are Not Getting Registered, Discord js v14.18.0
There is no error in console. I am confused with it. with the discord js version 14.18.0 I am using this from long time but never faced this error but now I am, Slash commands are not getting ...
1
vote
1
answer
157
views
Possible To Launch A Discord Activity From Embed Button Or Slash Command?
I have a Discord bot written in DiscordJS installed on some servers. I added an Activity to it (a mini-game). In all the docs I see and in testing I am able to launch my activity by clicking the ...
-1
votes
1
answer
41
views
Refreshing Discord events
Hello so I wanted to refresh my events, I thought i knew how but i guess i didn't. It enters the forEach loop although it errors out at the part where it deletes the require cache
const fs = require(&...
0
votes
1
answer
85
views
Discord.js 14 Slash Commands Duplicated
Not really sure why, but seems that my slash commands are registering twice. I've tried various methods, yes using ChatGPT, but so far all of the results have duplicates.
Any suggestions? (Besides ...
0
votes
1
answer
99
views
discord app (built with discord.js, Node.js) slash commands work inside server but not in DM
I'm currently building a Discord app that allows me to view a user's status (online, DND, offline) and what songs they are listening to. This works perfectly in my own server:
My app works in the ...
0
votes
1
answer
71
views
Discord permission issues when using channel.clone()
Within my discord bot, I created a /purge all command that clones the current channel by using the channel.clone() functionality of discordjs v14 (this creates an empty channel with the same name and ...
0
votes
0
answers
39
views
Failed to create Discord DM channel, Connect Timeout Error
I have updated the Discord robot token and tried different account user IDs, but the result is still the same request interface error. The HTTP of the request interface is 500, and all aspects of the ...
0
votes
1
answer
87
views
Discordjs v14, DiscordAPIError[50035]: type[BASE_TYPE_CHOICES]
I am developing a bot in Replit that makes a category structure. I am using Discordjs v14.18.0.
The problem is when creating a ChannelType.GuildAnnouncement, with value of 5, the error informs me that ...
0
votes
1
answer
72
views
DiscordJS Slash Command using fetch not returning response or any errors
I'm using Discord.js and am using NodeJS v22.14.0
I have a slash command called work which calls a remote PHP script and sends the userID value using POST.
When the command is run in Discord I get the ...
-1
votes
1
answer
61
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 ...
-1
votes
1
answer
89
views
discord.js v14 add member to a channel
I would like to add some members to the specific channel in Guild so only they are able to see the channel. I am creating a new channel via this script
const channel = await guild.channels.create({
...
0
votes
1
answer
81
views
How should I edit the code for sending messages from Google Script to Discord?
function doPost(e) {
// ตรวจสอบว่ามีข้อมูลส่งมาจาก Tradingview เข้ามาหรือไม่
if (!e || !e.postData || !e.postData.contents) {
return ContentService.createTextOutput("No POST data received....
0
votes
1
answer
142
views
Accesing Security Actions
I was wondering wether there is currently a way to acces the Security actions for a Guild via a bot, preferably through discordjs. I did not find any mention in the documentation though. Is there any ...
0
votes
0
answers
40
views
Error Initializing 'discord-player' with Discord.js Client
I do everything as shown in the documentation of discord-player but get following Error:
TS2345: Argument of type
import(".../ WebstormProjects/ DiscordBot/ node_modules/ discord. js/ typings/ ...
0
votes
0
answers
39
views
Empty tracks when use discord-player
I'm making a discord music bot with discord-player.
When using the player.search(), an empty tracks is output.
No errors are output, just empty tracks.
Why is the empty tracks returned?
I have little ...
0
votes
1
answer
53
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
1
answer
164
views
Is there a way to accept multiple images as one attachment option within a Discord Slash Command?
I'm currently building a discord JS bot to host an art server and I'm working on a command to allow users to upload their own reference photos to a designated #references channel. Users cannot type in ...
0
votes
0
answers
57
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
150
views
Discord Bot commands not getting deployed (stuck at deploying)
My Discord bot does stop at deploying commands to the specific guild.
It did work with the same code, at the same place, on the same guild, in the same terminal 3 min ago, and got stuck on deploying ...
0
votes
1
answer
79
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
29
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
50
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
45
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.
...