discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with Discords apps API.

Join

djs-questions

djs-voice

properties of reset_after is undefined

My application has been running smoothly around 2 years and suddenly it crashed. While checking issues i found out discord library is giving an error. What might be causing this?
No description

Detecting the double server boost

I am listening to the messageCreate event and, when the message.type equals 8, Sends a message to the channel. However, I want to avoid sending a message when a member boosts the server for the first time. because to handle this, I listen to the guildMemberUpdate event to detect the automatic Nitro boost. Essentially, I only want the messageCreate event to trigger for a member's second boost onwards.
I would appreciate it if someone could guide me!...

Strange session error when logging in.

This error is being thrown when I call client.login(token):
Not enough sessions remaining to spawn 1 shards; only 0 remaining
Any idea what's causing this?...

Is there a way to read users bio?

I want to add a function that checks users bio for links

[RPC] Pause timer on ActivityType.Listening

Is there a way to pause the bottom timer? I know it's not being updated, but I figured this is the best place to ask.

Type error with ApplicationCommandType and ContextMenuCommandType

I just upgraded TypeScript and some other things in my package.json and it apparently now thinks that the following code is invalid: ```ts new ContextMenuCommandBuilder() .setName('...')...

Failure to push a slash command

``` const getMp3 = () => { const allTracks = fs.readdirSync(path.join(path.resolve(), 'audio')).filter(file => file.endsWith('.mp3')); let trackData = []; for (const track of allTracks) {...

.getMember() with Typescript

I saw that options.getMember() sometimes doesn't return a GuildMember. How can I filter this case out?...
No description

Ephemeral replay to a channel message

Hey is it possible to replay to a message with an ephemeral or something similar (so only the user can see it, and it's not part of the channel message). From this event: client.on(Events.MessageCreate, (msg) => {}) Thanks!...

sweeping the cache

hi, I obviously haven't ever used it, but is it recommended? And if I have GuildMembers intent, will it sweep that as well or what? I'm sorry I'm just pretty much new to cache sweeps, haven't digged into it yet & would appreciate someone's guide on that!

Can ephemeral ever fail and show up as a regular message?

Reason I ask is because I have confirm/cancel buttons on slash commands that can only be invoked with certain permissions, and I want to know if it's completely unnecessary to have the logic for permission checking on the button interaction as well, because under no circumstance will the message be exposed to someone who lacks the permissions due to the checks on the command itself.

Forum question

How can I add a tag to a topic? I'm creating them on a forum. Which function should I use

Problem with guild.members.fetch

For some reason, the code I provided isn't working. I'm not sure why.
No description

How to send a file/attachment from an Attachment option on SlashCommand?

I've looked up that topic the the guide but can't find anything on how to send an attachment/file that I get from a slash command.

TypeError [ERR_INVALID_ARG_TYPE]: The "stream" argument must be an instance of Stream.

my bot has been running fine in production for years but today i'm getting this message on startup with no changes of any kind: ```/home/ubuntu/dice-witch/node_modules/undici/lib/web/fetch/index.js:2046 fetchParams.controller.controller.error(new TypeError('terminated', { ^ ...

Token is correct but still getting "Invalid Authorization Header"

See title. I'm trying to client.login(token) and I've tried both "Bot TOKEN" and "TOKEN", both give the same error.

how to handle interactions through interaction URL, no gateway

Hey, I haven't made bots in quite a while, so im kinda lost on how to do this in discordJS. question: - How do I use discord.js without connecting to gateway, purely through interaction URL ...

Keeping A Channel Polls Only

I'm trying to make a specific channel polls only. Since Discord doesn't have a permission set for this I've setup my bot to detect the difference in a poll message and a regular message. Regular messages get deleted from the channel and the user a DM stating why. Polls get ignored. This has been successful....

Can't install dependencies on discord.js repo

Hi, I want to install dependencies to execute packages of discord.js repo, and I'm following the tutorial written on https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md. But as soon as I run pnpm install --frozen-lockfile it gives me this error: https://pastebin.com/cA5nx750 How can I solve that?...