Skip to main content
Filter by
Sorted by
Tagged with
-4 votes
0 answers
24 views

Is there a way to use packages like Discord.js in html files? [closed]

Can i use discord.js or any npm package on html pages with type="module" attribute? I want to create a Apache Cordova project but I'm not sure if cordova accepts backend programming. I am ...
Kavascript's user avatar
0 votes
1 answer
32 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
2 votes
0 answers
50 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,193
1 vote
1 answer
35 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
47 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
35 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
49 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
30 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
32 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
23 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
27 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
25 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
30 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
36 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
31 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
50 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
42 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
0 votes
0 answers
22 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
0 answers
34 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
30 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
43 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
45 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
34 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
55 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
47 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
38 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
24 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 votes
1 answer
87 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 ...
mev's user avatar
  • 21
0 votes
1 answer
30 views

discord js v14 make buttons interaction execute in an other file

I've been looking to make button files on a /commands bot, but I don't have any idea on how to do it I know it should be possible because in the discord documentation they tell we can do this in the ...
Evileoo's user avatar
  • 15
0 votes
0 answers
33 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 ...
Daemon's user avatar
  • 35
1 vote
1 answer
37 views

How to use EventEmitter with discord.js

I have a typescript app that I am writing and would like to add discord embeds to. However, I am having an issue adding the discord.js module to it because it is not allowing me to call this.emit or ...
scapegoat17's user avatar
  • 5,761
0 votes
1 answer
27 views

How to fix the "reactions.values(...).filter is not a function" error?

I'm trying to make a giveaway discord bot, but when I try to choose a random winner, it breaks and gives me this error: reactions = reactions.values().filter(user => user.id != "...
Tuf Kourio's user avatar
0 votes
1 answer
46 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 ...
희민TV - HeeminTV's user avatar
0 votes
0 answers
104 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 ...
user1731199's user avatar
0 votes
1 answer
55 views

db.Collection Is Not a Constructor

I'm having this issue where I'm trying to create a leveling system in Discord using discord.js and MongoDB. Every time I try to upload my data to the database, I keep getting the error message level ...
Christian Ambarita's user avatar
2 votes
0 answers
63 views

Headers error while making Discord authorization page [duplicate]

I'm making a website with dashboard for a Discord bot. Only when I'm making the authorization page with the help of JWT to make a token it keeps giving me a headers error (see below). I'll put my code ...
Ghost Unknown's user avatar
0 votes
2 answers
48 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) =>{ ...
희민TV - HeeminTV's user avatar
0 votes
1 answer
63 views

Discord bot crashes immediately after sending a dm to anyone

When I try to send a dm with my discord bot through discord.js, it successfully sends the message in dms and replies to my message that it had sent the dm, but then crashes in terminal, I have tried ...
Tuf Kourio's user avatar
0 votes
0 answers
33 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 ...
희민TV - HeeminTV's user avatar
0 votes
1 answer
24 views

Error thrown by discord snowtransfer: [ERROR] Error when sending Discord DM: TypeError: Cannot read properties of undefined (reading 'id')

I was using snowtransfer discord client for sending the messages to the users from my bot. It works well for the most part but while sending the dm to one of the users I got this error: [ERROR] Error ...
0xKumi's user avatar
  • 1
-1 votes
1 answer
35 views

Why my discord modal when i click didn't close?

When i clicked the button modal discord always an error. I dont know why my discord modal error I want when i click the submit button, discord modal closed, but here still open. and show error on ...
Abiel Al Farel Syah's user avatar
0 votes
1 answer
168 views

How do I get Application Emoji

Discord supports having Application Emoji, how can I use them in Discord.JS? I have tried this: const emoji = client.emojis.cache.get('EMOJI_ID'); but it only returns an undefined. I uploaded the ...
Ben Walker's user avatar
0 votes
1 answer
109 views

How can i read and write to cells in the same function?

I would like to read the spreadsheet cell H2 in the same function blackList With this script, i am currently writing to cell H1. I would like to read cell H2 as well. This is my updated script: const {...
famq's user avatar
  • 17
0 votes
1 answer
69 views

How can i write to a specific cell in a Google sheets range?

I am creating a discord bot and would like to write to a specific cell in Google sheets. With this code i am able to post the userInput into the embed when the command is executed on discord. However ...
famq's user avatar
  • 17
0 votes
0 answers
19 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 ...
희민TV - HeeminTV's user avatar
1 vote
1 answer
73 views

How can I use specific cells in a Google sheets range?

I'm creating a Discord bot. Whenever I use the command that this is linked to it works. However it displays all the data in all cells in the set range. How do I get a specific cell out of the range ...
famq's user avatar
  • 17
0 votes
0 answers
49 views

Discord.js Auto Register Slash Commands

Trying to build an index.js file that auto loads, auto reloads, and disables modules with errors in them to prevent the bot from crashing. This portion is working fine. One of the modules that is ...
Elser Pilot Car's user avatar

1
2 3 4 5
346