17,226 questions
0
votes
1
answer
26
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
49
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: ...
1
vote
1
answer
33
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
36
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
55
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
36
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
34
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 ...
0
votes
0
answers
39
views
Am I wrongly handling deferral in this Discord.js slash command?
This is a Discord.js command to send embeds to a specific text channel. I'm struggling a little bit with the replies/updates deferral.
When the modal is submitted, the command raises an Interaction ...
1
vote
1
answer
39
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
33
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 = ...
0
votes
1
answer
58
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
68
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
31
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
26
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
46
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
53
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
52
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
60
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
69
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
76
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
28
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
27
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
33
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
71
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
42
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
64
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
61
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
27
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
36
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.
...
0
votes
1
answer
69
views
problem getting original emojis from discord [discord.js/discordjs v14]
I am trying to create a discord bot to assign roles based on a reaction to a message from the bot.
I can execute the action using custom emojis like this:
const GET_EMOJI = (name) => client.emojis....
1
vote
1
answer
42
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
46
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 ...
0
votes
1
answer
34
views
Trying to limit the suggested roles while typing commands
I have been trying to reduce the amount of roles that are show while typing a slash command in a discord bot. I have some logic that I thought was correct but I must not be understanding something ...
0
votes
0
answers
172
views
Cannot play a resource that has already ended. / Could not extract functions
I'm getting the "Cannot play a resource that has already ended." when I try playing music with this current code:
https://sourceb.in/yaQ12o8KPT
-
It makes the bot crashes with that error ...
0
votes
2
answers
119
views
How can I limit a slash command to only one, specific user?
I'm writing a Discord bot using TypeScript and Discord.js to implement a game.
As part of the game, I would like certain commands to be secret - they should be restricted to one user only, and the ...
1
vote
0
answers
37
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
1
answer
138
views
Get server boost level for Discord bot
I'm writing a Discord bot in NodeJS. I'm wanting to make a check to see if the Discord server the bot is used on is boosted or not before the command fully executes. I have not been able to find out ...
0
votes
1
answer
45
views
How to reset select menu to placeholder in discord.js?
I am creating a system ticket and using dropdown as the ticket category selection option. I want when selecting it will automatically return to the placeholder like the gif I attached
The Example
...
0
votes
0
answers
28
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
71
views
have Discord.js bot support both slash commands and prefix
is there any way that i can get my bot to support both discords slash commands and my bot prefix without any headache
right now my bot works with the prefix ; or whatever prefix is set in the guild, ...
0
votes
1
answer
85
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
0
answers
31
views
Detect thread autoarchivation using discord.js
Can you detect a thread being autoarchived. I did a test on ThreadUpdate event but it doesn't seem to work.
0
votes
1
answer
49
views
"MessagedEmbed field values must be non-empty strings" and "Cannot read properties of undefined (reading 'Link') error message
I am making a discord bot and I'm kinda new to this. I get both errors all the times, one after I fix the other. I figured it might have something to do with Typescript strict.
'use strict';
require('...
0
votes
1
answer
84
views
How do I create a listener to post a channel name when a channel is mentioned?
I'm sure this is fairly simple and I'm just overthinking things as I tend to do but..
I am trying to add code to my discord bot so that when a channel is mentioned (<#channel.ID>) the bot will ...
0
votes
1
answer
75
views
displaying subcommands in help embed
whatever i try i cannot get to display the subcommand. it just displays this
Commands in Fun
/fun: Fun commands to play with!
Today at 13:07
example fun.js
i have tried searching the internet, asking ...
0
votes
1
answer
46
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
46
views
Discord modal error on submission. The modal window gives a "Something went wrong" error, but no errors in console
When I submit the modal just gives a Something went wrong error.
Here is the section of my code:
// Handle Submit Score Button
if (customId.startsWith('submit-score')) {
console.log(`Received ...
0
votes
0
answers
38
views
Is there a way to remotely start a discord bot with another discord bot?
So I'm making a Discord bot that has 3 slash commands which are "start", "stop", and "restart" but I am stuck on /start. I've coded the part where if /start is run, it ...
1
vote
1
answer
62
views
In discord Js guildmemberupdate not emitting when avatar has changed?
For some reason the GuildMemberUpdate is not triggering when a user in the guild with the bot changes there avatar but it will trigger for everything else like username change and role remove/add,
Im ...