17,293
questions
0
votes
0
answers
6
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 ...
0
votes
1
answer
26
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 ...
0
votes
1
answer
23
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 ...
-1
votes
0
answers
18
views
async get has strange problem with downloading file from discord channel. discord js
I'm making the bot to download the file from message but strange error happens
const get = require("async-get-file");
if(message.attachments.first()){
message....
-1
votes
1
answer
24
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 ...
0
votes
0
answers
41
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 ...
0
votes
0
answers
31
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 ...
0
votes
0
answers
50
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 ...
0
votes
1
answer
38
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() ...
0
votes
1
answer
23
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]....
-1
votes
1
answer
34
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 ...
0
votes
0
answers
22
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,...
-1
votes
1
answer
51
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 ...
0
votes
1
answer
28
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 ...
0
votes
0
answers
32
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 ...
-1
votes
0
answers
29
views
Why I cannot use client.applicaton.owner in DJS
So in this embed code i just wrote, even when i tried everything, just cannot use anything other than client.user.tag which pings my bot but i want it to ping me.
here's the code:
const Discord = ...
1
vote
1
answer
34
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 ...
0
votes
1
answer
26
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 != "...
0
votes
1
answer
43
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 ...
0
votes
0
answers
101
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 ...
0
votes
0
answers
36
views
Discord API Error when running a command twice
The code i am currently using works, It is writing data to cell H1, and getting data from cell H2 in my google sheet. However when the command is ran twice in less than 1-2 minutes the bot crashes. ...
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 ...
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 ...
0
votes
2
answers
43
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) =>{
...
0
votes
1
answer
44
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 ...
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 ...
0
votes
1
answer
23
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 ...
-1
votes
1
answer
33
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 ...
0
votes
1
answer
83
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 ...
0
votes
1
answer
98
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 {...
-2
votes
0
answers
28
views
Discord JS | Modal, Interaction has already been acknowledged
I have a small problem that I can't solve with discord JS. In fact, my command will generate an embed with a button, and when I click on this button it opens a form for me. Except that there is a ...
0
votes
1
answer
63
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 ...
0
votes
0
answers
18
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 ...
1
vote
1
answer
66
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 ...
0
votes
0
answers
38
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 ...
0
votes
1
answer
37
views
How to get all user roles from interaction?
I'm using discord.js and need to get all current roles from user, which interacted by slash command. How can I do that?
I tried using interaction.guild.members.cache.forEach(r => { currentRoles....
0
votes
1
answer
32
views
how can I make the activity part of the bot's profile invisible when the bot is active?
client will look active, but I want that gray part of the place to look like the complete avatar of my bot
like that
i tried many ways to do that like ws and client presence options but it couldn't ...
0
votes
1
answer
29
views
VS Code autocomplete for discord.js module exports
I code discord bot in VS Code. I liked it but sometimes its too hard becasuse autocomplete doesn't work. I have main file and then folder with all commands.
In main file i have something like this:
...
0
votes
1
answer
43
views
Is there a way to manipulate the order of execution of arguments in a Discord.py async function?
First off, I apologize if I am using wrong terminologies on this question. Hopefully, I can come through with the details.
I am trying to send files(local images) and embed using the command await ...
0
votes
0
answers
39
views
When a button is clicked, it creates a channel (ticket bot)
when i run my code:
if(!interaction.isButton() || interaction.customId !== 'ticketCreate') return;
guild.channels.create({
name: "test",
type: ChannelType....
0
votes
0
answers
31
views
I am making a discord bot but it won't start up when I run the 'startup.js' file
Can someone help me start up my bot? its startup code looks something like this
const { Client, Events, GatewayIntentBits } = require('discord.js');
const { token } = require('./config.json');
const ...
0
votes
1
answer
32
views
Error: TypeError: user.send is not a function
I am trying a discord bot with a modal, I want to send a private message to the user, but an error appears like this
Error: TypeError: user.send is not a function
this is my code
const invoke = ...
0
votes
0
answers
76
views
Discord API responding with "Request failed with status code 401"
I am developing a discord servers list, the site itself is complete, but I am having major issues ever since switching to slash commands (requirement for verification, unless approved for Message ...
0
votes
0
answers
75
views
Discord bot wont play music
I made a discord bot thart play music and it works perfectly fine in the past few weeks but suddenly one day I tried to play a music and the bot joined the voice channel but it did not play any music. ...
0
votes
0
answers
18
views
Custom prefix command with discord.js in commands folder
below is the code of my ping.js file in commands folder as suggested on discord.js documentation, but instead of using Slash command builder I am using this below method(no specific reason for not ...
0
votes
0
answers
35
views
Discord Js V14 Setting permissions on channel not working as expected
when creating a channel with the bot i wanted originally to set the permissions for everyone to not see the channel but for a specific role to see it and for the person that used the command to see ...
0
votes
2
answers
42
views
Error : Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'FLAGS') Discord bot Discord.js V14
i just wanted that the bot if i interact with the button it will create a channel on the "ticket" category if there is no ticket category i verify if there is any category with the id that i ...
0
votes
0
answers
23
views
Discord error "Interaction has already been acknowledged"
I'm trying to make a discord bot which will track your hack club arcade sessions, but I am coming across the issue
Error [InteractionAlreadyReplied]: The reply to this interaction has already been ...
0
votes
1
answer
45
views
Discord bot is online - but not responding
I created a discord bot with replit in js. The bot has only one command, its to say pong when we say ping.
Here is my code:
require('dotenv').config(); // Assurez-vous que le fichier .env est chargé
...
0
votes
1
answer
59
views
suddenly meet some problem with ts compiler and EventEmitter
just found this from my friend (thx Jeremy also)
https://github.com/discordjs/discord.js/issues/10358
i now downgrade my ts version to 5.4
kinda solved the issue, at least compilation successes.
---...