Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
user27086988's user avatar
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 ...
Alex's user avatar
  • 1
-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....
희민TV - HeeminTV's user avatar
-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 ...
Jacob Malland's user avatar
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 ...
Nathan's user avatar
  • 1
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 ...
DonutMan's user avatar
-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 ...
user21317313's user avatar
-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 ...
mev's user avatar
  • 21
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 ...
Daemon's user avatar
  • 35
-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 = ...
Ernedhir's user avatar
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 ...
희민TV - HeeminTV's user avatar
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 ...
user1731199's user avatar
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) =>{ ...
희민TV - HeeminTV'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
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 ...
희민TV - HeeminTV's user avatar
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 ...
Jordan's user avatar
  • 19
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 ...
wixter-dev-acc's user avatar
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 ...
wixter-dev-acc's user avatar
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 ...
DevCmb's user avatar
  • 1
0 votes
0 answers
35 views

exported variables always return undefined in discord.JS V14

in events/messageCache.ts: import { Events, Message } from 'discord.js'; export interface MessageCacheEntery { authorID: string; deleted: boolean; message: string; timestamp: number; }...
Jaco's user avatar
  • 11
0 votes
0 answers
24 views

"Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred" I keep getting this error on discord.js v14

I am trying to make a bank command with subcommands "balance, withdraw, deposit and transfer coins", but every time I try to run the command I get the error "The reply to this ...
akaxyi's user avatar
  • 1
0 votes
1 answer
38 views

Discord.JS TypeError: Cannot read properties of undefined (reading 'reduce')

Receiving the following error when using any interaction in Discord.js Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'reduce') at BaseInteraction (node_modules\discord....
Elitezen's user avatar
  • 6,691
0 votes
1 answer
55 views

Discord.JS Invalid Form Body when creating a select menu

I'm new to menu selectors and I'm not really sure why I'm having problems getting started with it. I've tried to make a test menu selector to get started. const menu = new StringSelectMenuBuilder()...
Dev03's user avatar
  • 3
0 votes
1 answer
34 views

How can I not trigger GuildRoleCreate event by adding a bot?

const botMember = await role.guild.members.fetch(executor.id).catch(() => null); if (botMember && botMember.user.bot) { return; } So Im trying not ...
Oğulcan Ketenci's user avatar
1 vote
1 answer
49 views

Node.js terminal not usable after running main file

I just started making a Discord bot using Node.js in Visual Studio Code, but I've stumbled upon an issue that I haven't been able to fix. When I run, for example node deploy-commands.js, the terminal ...
frapsed's user avatar
  • 13
0 votes
1 answer
73 views

How to store a Global variable between restarts with MongoDB

I have a $count command which increases a variable "count" by 1. Every time I reset my bot, the count goes back to 0, because I set it with let count = 0. My issue is that I don't want the ...
Proking's user avatar
0 votes
0 answers
85 views

Error: Cannot find module opus.node - trying the wrong directory?

I'm trying to get an old project working again and after cloning it with no changes from what used to work I've been getting a cannot find module error. Here is the full error: Error: Cannot find ...
Kyle Malling's user avatar
-1 votes
1 answer
45 views

Discord.js | Bot's role reactions post does not continue to work between sessions [closed]

I'm trying to set up a /roles command for my Discord bot. The goal is to have the bot post an embed with some automated self-reactions that correspond to self-assignable roles identified in the embed. ...
Jake Livsey's user avatar
0 votes
0 answers
74 views

Discord bot is not playing given URL

I am working on a Discord music bot powered by discord-player v6.6.10 and discord.js v14.15.3. Currently, when the user executes the /play command, the bot properly searches for the given URL, grabs ...
itz_lexiii_'s user avatar
3 votes
1 answer
38 views

Discord.js: Removing roles doesn't work when splitting code into two modules

I am making a discord app that removes a role and adds another, it was working fine when everything was in one module, but when I tried to make two more modules one for adding the role and one for ...
jacob's user avatar
  • 31
1 vote
1 answer
34 views

Discord.js Command Option Type?

I am making a discord bot with TypeScript. I us an interface ICommand for referring to a discord command. Also, I manually created another interface ICommandOption for referring to a discord command's ...
Toriacx's user avatar
  • 11
0 votes
2 answers
86 views

Error: ENOENT: no such file or directory, stat discord.js

I'm trying to run a bot via Visual Studio Code, my bot works fine for a couple of minutes before completely breaking with an error that idk how to fix. My Code: const { Client, GatewayIntentBits} = ...
K40M0J1's user avatar
  • 11
0 votes
1 answer
35 views

Discord Bot (discord.js ^14) does not see direct messages

I have invited the bot to my server and it does see all messages typed over there. However, when I send it a DM, it does not react at all, even the event 'messageCreate' is not invoked. const client = ...
yarik89's user avatar
0 votes
1 answer
84 views

How can I make this slash command a message (prefix) command?

I'm hosting a Discord bot for a small private server of mine with the purpose of pulling a random image from Google Images search results. I've been using this repository as the basis, and after ...
JomSpoons's user avatar
1 vote
1 answer
689 views

Error running discord.js bot in docker: ReferenceError: ReadableStream is not defined

There are discord.js bot (below: main.ts, basic logic in modules): import {Client, GatewayIntentBits, ThreadChannel} from "discord.js"; import {startCommandBuilder} from "./builders/...
Vanchugov Artemy's user avatar
0 votes
0 answers
34 views

MaxListenersExceededWarning in discord.js despite only having one listener

I am creating a Discord bot using discord.js. One of the bot's commands requires it to send a large number of DMs to various different users. Whenever that command is run, I get a ...
Spencer Mowdy Hill's user avatar
-3 votes
1 answer
84 views

Creating custom bot for an Discord Guild [closed]

I have seen several discord bots that have the option to customize some details of the bot (Name, Avatar, ...), some examples are MEE6, ProBot and some others. What I would like to know is how to do ...
Ray's user avatar
  • 111
0 votes
0 answers
37 views

discord-player track instantly ending after starting (only sometimes)

I am having a lot of trouble with this bug, and is almost impossible to track through error-tracking. The track begins, and as soon as it begins, it will end (only sometimes). This is not track-...
Jonno's user avatar
  • 1
0 votes
1 answer
168 views

Cannot Register Slash Commands while Building my Discord Bot

I have trying my hands out in building my own Discord Bot. I have tuned it to reply on any message from the user. I have built it entirely by reading the documentation on discord.js. The reply thing ...
Abir Banerjee's user avatar
0 votes
0 answers
171 views

Node/Discord.js creating a Bot to automatic remove members from threads

Another day another project. Today I am using Node.js to create a Discord bot to automatically remove members from a Discord thread or post who lost the "view channel" permission to said ...
TimM's user avatar
  • 61
0 votes
1 answer
40 views

discordjs - force fetch an user with user handle?

I'd like to force fetch an user, but with the handle and not the user id. Is it possible? Also note that the users I'm trying to fetch may not share a guild with my bot. Here's what I'm trying to do: ...
A18's user avatar
  • 1
0 votes
0 answers
52 views

Using discord.js and plain Javascript (no JQuery, etc.), how can I make a Discord bot direct-message a PDF to a new user from guildMemberAdd event?

const Discord = require('discord.js'); const bot = new Discord.Client (); bot.on('guildMemberAdd', member => { member.send("Welcome to the server!"); //This works. member.send(...
user41076's user avatar
0 votes
1 answer
34 views

Can't import cubing.js in node discord bot

I was trying to import the cubing.js module in nodejs so I can use in in my discord.js bot. However when I use the following import const {randomScrambleForEvent } = require('cubing/scramble') I run ...
Hamza Hafeez's user avatar
1 vote
1 answer
28 views

Validation error while trying to deploy SlashCommands

I'm trying to create some slash commands for my discord bot, but there is an issue I can't figure out while trying to deploy them. I'm using discord.js both to create the commands, via ...
CcmU's user avatar
  • 841
0 votes
1 answer
33 views

Error [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred when autosending images

Iam trying to make a slash command for my discord bot which will automatically send 1 image from e621 for example every one minute. It works for several. But then throws an error and the bot crashes. ...
Sapphire Shork's user avatar
0 votes
0 answers
34 views

Server join and leave logger doesn't save data in file

I had an idea of developing a logging tool for my Discord Bot, so everytime it joins or leaves a server (with the guildCreate and guildDelete function) that it should save some data like the server ...
Blaxyy's user avatar
  • 7
0 votes
1 answer
39 views

Invalid Webhook Token error after few hours of auto sending images

I was trying to make a slash command for my discord bot which will automatically send 1 image from e621 for example every one minute. It works for a hour or two. But then throws an error and the bot ...
Sapphire Shork's user avatar
0 votes
0 answers
28 views

node.js bot is not playing sound

I have tried to make a simple discord bot to play music from youtube using ytdl and yt-search, but for some reason, after running the command to play the video, the bot connects to a channel, and is ...
func_kenobi's user avatar
0 votes
1 answer
178 views

Using node js sharp package composite function is not giving an animated result

I have created a simple program using discord.js, what I want is to combine a still image with an image containing animated frames, then the bot will send the result of the animated image and the ...
AchrafOu's user avatar
-1 votes
1 answer
29 views

commands undefinde (name_localization: )

I try to make a discord bot with javascript. My problem is that the commands in discord don`t function. Can someone help me to fix this issue? This is my error: /applications/1235114104566579231/...
Kres Schröder's user avatar

1
2 3 4 5
166