Questions tagged [discord.js]
discord.js is a Node.js module that allows the developer to interact with the Discord API. Use this tag for questions about the usage of discord.js, not for questions regarding the Discord API or Discord in general (for API questions, use the 'discord' tag). Consider also using the 'javascript' and the 'node.js' tags.
discord.js
17,287
questions
0
votes
1
answer
45
views
How to get all channel messages with discord bot in javascript
I have the discord getting started example project running and working, so that I can run /test and it gives a working response. I also created a new command /getmessages, which now just returns a ...
0
votes
0
answers
21
views
Discord.js v14 Slash Commands Stop Responding After the First One is Ran
For starters I am still pretty new to coding and don't have everything down perfectly yet. I was following along with the discord.js guide as well as a few YouTube videos. Everything was working well ...
0
votes
2
answers
33
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} = ...
0
votes
1
answer
19
views
Node cron isn't sending my task through discord
I tried to make a scheduled message with my discord bot using node-cron (discord.js) but the message doesn't seem to work.
When I use the console.log function to send the task into the console, it ...
2
votes
0
answers
28
views
Issue with Discord.js: "Interaction has already been acknowledged" and "Unknown interaction" Errors
I'm developing a Discord bot using Discord.js and encountering some issues with button interactions in a specific command. When I try to update an interaction for the second time, I get the following ...
0
votes
1
answer
20
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 = ...
-1
votes
0
answers
21
views
How can i change tags from my post using discord.js v14
i want to change the tags from my post when i click in a button, but I didn't find anything in the documentations and I'm a little lost about it. Is it possible to change this in the current version ...
0
votes
0
answers
25
views
Issue with /poll command in Discord.js using ButtonStyle() + MongoDB poll data storage and recall
index.js: https://gist.github.com/daggerbyte/57c12a797949b939ec800a8738860fa0
interactionCreate.js: https://gist.github.com/daggerbyte/3c4d5c41f54b53554c0aa4bc843e594d
poll.js: https://gist.github.com/...
0
votes
0
answers
33
views
Discord.js ephemeral Issue
I have this settings.js file that is running for the settings within a bot. The issue is that the message is displayed for everyone and not just one person, but I have the ephemeral: true at the start ...
-4
votes
0
answers
33
views
How to Handle Large Numbers in JavaScript [closed]
I tried using the bigInt module, but I couldn't find a way to tell the SQL query to store the retrieved number as a big integer within the database. I'm hoping someone has an idea to solve this ...
0
votes
0
answers
28
views
Discord.js sticky message V14 [closed]
I want to make a sticky message in discord.js which will delete the previous message and send the new message every time a new message is sent.
I tried this:
if (message.channel.id !== config....
0
votes
1
answer
45
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 ...
-1
votes
0
answers
20
views
Discord.JS not producing any sound
got stuck here, the bot seems to do exactly what I want but it does not produce any sound, it shows the song but just no sound. I put GatewayIntentBits.GuildVoiceStates in the Client instance, I also ...
-1
votes
0
answers
34
views
Error running disocrd.js bot: Connect Timeout Error
There is a DJS bot (below: main.ts)
import {Client, GatewayIntentBits, SlashCommandBuilder, TextChannel} from "discord.js";
import {StartCommandCreator, StartExecutor} from "./commands/...
0
votes
1
answer
28
views
Discord.js V14 - Use embeds stored in another file
So,
I think the title is pretty explicit x)
Originally, the embeds were directly in the base file, but if I left them in, it would become quite complicated to modify them as needed.
So I created a ...