Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
27 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, ...
Minoa's user avatar
  • 19
-3 votes
1 answer
28 views

Can't get this to work Interaction failed discord.js [closed]

I've been coding a discord ticket bot that opens a private channel with a user after they've opened a ticket, I've also added an advanced setup system that works just fine. However I'm not able to ...
ScremerMemer's user avatar
0 votes
1 answer
42 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 ...
dawutheuwad's user avatar
0 votes
0 answers
25 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.
Noname's user avatar
  • 13
0 votes
1 answer
38 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('...
user28169474's user avatar
0 votes
0 answers
70 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 ...
Viv's user avatar
  • 1
0 votes
1 answer
60 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 ...
Siddharth Sinha's user avatar
0 votes
0 answers
20 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 ...
RedSkull's user avatar
-1 votes
0 answers
19 views

adding Fields to an Embed with the message ID of an Embed

I want to add Fields (using addFields) to an embed but I only have the message ID of the embed not the variable. Can someone help me? i tried this: messageID.addFields({ name: 'the top part of te ...
NetroTim's user avatar
0 votes
1 answer
37 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 ...
Dennis Bennatte II's user avatar
0 votes
0 answers
25 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 ...
mrJoke's user avatar
  • 1
0 votes
0 answers
16 views

Problem with redirect from adding a bot via discord Oauth2

I have problem with make this link redirect after adding a bot. https://discord.com/oauth2/authorize?client_id=${process.env.CLIENT_ID}&permissions=8&response_type=code&redirect_uri=${...
Blackpearl's user avatar
1 vote
1 answer
44 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 ...
Samy NightCore's user avatar
0 votes
1 answer
45 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 ...
Amit's user avatar
  • 1
0 votes
0 answers
30 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 ...
박병관's user avatar
0 votes
1 answer
37 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 ...
meloMellow's user avatar
0 votes
2 answers
51 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 ...
user874737's user avatar
0 votes
0 answers
41 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 ...
Jordan's user avatar
  • 1
0 votes
0 answers
32 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 ...
Elser Pilot Car's user avatar
0 votes
1 answer
62 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 ...
Aleas's user avatar
  • 11
0 votes
0 answers
23 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, ...
Hisham Akmal's user avatar
0 votes
1 answer
46 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') ...
Lewis Byers's user avatar
3 votes
1 answer
79 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 ...
NullDev's user avatar
  • 7,283
1 vote
1 answer
47 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], ...
Evileoo's user avatar
  • 15
1 vote
0 answers
50 views

Missing auto-fix options when extending class with abstract method containing union types?

The class I'm working on has an abstract execute method with type unions. My problem is that when a user of this class imports it for use, there's no auto-fixes available in VS Code, be it add all ...
Andrew Kerr's user avatar
1 vote
1 answer
47 views

How can I count Mongoose Schema documents with a filter?

I am trying to count the entries in a database (w/ a Schema) while only filtering for a particular user (filter), but it keeps not working. Here is my code: WarningSchema.find({ user_id: user.id....
Aestriex's user avatar
0 votes
0 answers
76 views

DiscordAPIError[40060]: Interaction has already been acknowledged. Discord.js

I've been trying to solve this problem for quite some time. I am making a ticket system and it is very annoying that this error appears. There are times it comes out and times it doesn't. I don't know ...
user27414786's user avatar
1 vote
1 answer
33 views

How can I use the .find() output for schema validation?

I am trying to make a Discord bot with a command called /moderator with a sub-command /moderator add which adds a user's ID to a moderator database (MongoDB/Mongoose) which is then checked anytime ...
Aestriex's user avatar
0 votes
1 answer
41 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. ...
Kovu Bentley's user avatar
1 vote
0 answers
24 views

Why is the daily box not being added to the inventory? [closed]

I am trying to fix the issue where the daily box is not being added to the user's inventory when the user claims their daily every 3 days consecutively. here is the portion of the code where I try to ...
Roman Beard's user avatar
0 votes
0 answers
31 views

I can't make my previous button work on an embed message (DISCORD.JS V14)

So I am trying to make a bot for discord, to see cards from the One Piece TCG. For now, I can show a card with his ID, and I'm trying to make it work with an array. So actually, my "next" ...
Volgark's user avatar
0 votes
0 answers
41 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 ...
Sefian's user avatar
  • 1
1 vote
1 answer
41 views

My discord bot does not register the commands

I have created a Discord bot on a server and it has registered all the commands (/) perfectly with this code that reads a folder named “comandos” and gets all the JS extension files: //Load commands ...
Raymond J.'s user avatar
0 votes
1 answer
39 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(...
hg y 's user avatar
0 votes
1 answer
41 views

Discord.js Slash Commands Crash

As I was following the guide on https://discordjs.guide/creating-your-bot/slash-commands.html#individual-command-files I stumble a problem named ENOENT -4058 when trying to read the commands location ...
Arthurgamer Pro's user avatar
0 votes
2 answers
59 views

module.exports returns value too early

I'm creating a Discord bot based on a tutorial and currently I'm working on a leveling system. I have a file for a function that looks for the rank of the user in MySQL and returns the rank. The file ...
Phil-Absynth's user avatar
0 votes
1 answer
51 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 ...
Alex's user avatar
  • 1
1 vote
0 answers
29 views

Reddit auth error 401 when running autopost command in discord.js bot

I’m running into some trouble with my Discord bot that’s supposed to fetch images from Reddit. I keep hitting this error: Error obtaining Reddit access token: { message: 'Unauthorized', error: 401 } ...
Sapphire Shork's user avatar
0 votes
1 answer
44 views

Discordjs Interaction.followUp() not working

I'm making a discord bot command which returns members of a role. The interaction.deferReply() works fine but the interaction.followUp(...) doesn't work. The interaction is stuck on '--- Bot is ...
stacks's user avatar
  • 1
0 votes
0 answers
16 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 ...
user27086988's user avatar
0 votes
1 answer
37 views

channel.createWebhook causes 'no such file or directory' error

I am creating a bot in Discord.js v14, I am trying to make a simple modmail bot, but when attempting to create the webhook, I get a very strange error which doesn't look like it has any connection ...
rileyhopkins's user avatar
0 votes
0 answers
30 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 ...
Alex's user avatar
  • 1
-1 votes
1 answer
60 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 ...
Jacob Malland's user avatar
0 votes
0 answers
48 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 ...
Nathan's user avatar
  • 1
0 votes
0 answers
44 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 ...
DonutMan's user avatar
0 votes
0 answers
61 views

I Can't Run Application Command with Discord.js v14

I'm just trying to learn how to bot with Discord.js v14. Even though the Slash Commands I saved in my bot are saving and working properly, when I try this for the Application Command, it saves the ...
Di Mostavay's user avatar
0 votes
1 answer
51 views

Validate user string input inside the Discord.js SlashCommandBuilder

I have added a StringOption to a slash command in my Discord.js bot that I wish to validate before the command is sent. I can limit the length of the string with .setMaxLength() and .setMinLength() ...
Saelvarath's user avatar
0 votes
1 answer
27 views

No role is assigned in discord js TypeError: Cannot read properties of undefined (reading 'add')

Please tell me how to assign a role in discord.js by the user ID, which is located in the variable id (let id = interaction.message.embeds[0].fields[5].value;) let id = interaction.message.embeds[0]....
Phanvoy's user avatar
-1 votes
1 answer
42 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 ...
user21317313's user avatar
0 votes
0 answers
27 views

WebStorm (TypeScript) does not see certain imports, why?

I have a line with the discordJS import {ChatInputCommandInteraction, Guild, Snowflake, ChannelType} from "discord.js"; WebStorm highlights ChannelType import as incorrect. I.e. shows error,...
Vanchugov Artemy's user avatar

1
2 3 4 5
346