17,253 questions
0
votes
0
answers
11
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
22
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
37
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
0
answers
21
views
how would i update my twitch access token with my refresh token in discord js? [closed]
i am building my own twitch bot and now i got the problem of my twitch token not automatically updating and i got no clue on how i would actually do that. i got a basic ready.js running right now and ...
0
votes
1
answer
46
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
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 ...
-2
votes
1
answer
38
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
67
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
47
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
24
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
17
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
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
24
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
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
42
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
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.
...
0
votes
1
answer
51
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
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 ...
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
129
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
75
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
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
1
answer
116
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
39
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
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
65
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
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
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
47
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
74
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
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
44
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
36
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
60
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 ...
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
0
answers
47
views
In developing discord App. How can I use session for token
I am making discordBot(express + ts server). It use discord OAuth2 token because I need to use API(ex /users/@me/connections). So I tried to manage access_token with session, But It's not working like ...
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
76
views
Why isn't my Audit Log event working with my Discord bot?
I am trying to get audit logs to work with my Discord bot. I've set up my bot according to the instructions on discordjs.guide. I am starting with trying to log when a message is deleted but it's just ...
0
votes
0
answers
38
views
Discord.js 14 - Bot Change "Everyone" Voice Permissions
I've hit a bit of a roadblock with an idea. There are no errors in the code, console wise, so I'm sure it's just a matter of how I'm trying to do things.
The general idea is if an event is scheduled ...
0
votes
1
answer
75
views
My discord music bot dont working. Not receiving commands
I tried to develop a discord music bot instead of using another bots. Here`s my code:
const Discord = require('discord.js');
const {
prefix,
token,
} = require('./config.json');
const ...
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,
...
0
votes
1
answer
50
views
TypeError: Cannot read properties of undefined (reading 'GuildText')
I keep getting this error,
[AntiCrash] | [UncaughtExceptionMonitor_Logs] | [Start] : ===============
Uncaught exception monitor: TypeError: Cannot read properties of undefined (reading 'GuildText')
...
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],
...