discord.js - Imagine a 👻

DIA

discord.js - Imagine a 👻

Support server for discord.js, a Node.js module to interact with Discord's apps API.

Join

djs-questions

djs-voice

1. Is it worth it to switch from DPY 2. How long would it take me to have a decent knowledge(JS&DJS)

I've been a developer for years but I mostly do it as a hobby I know Lua and python and I worked with DPY I wanna learn JavaScript so I thought JDS would be good as a first project since I'm already familiar with discord bots And is there a difference between DPY and DJS that would make me switch fully to DJS...

buffer.File Warning

When I try to send an attachment file this error shows
(node:26404) ExperimentalWarning: buffer.File is an experimental feature and might change at any time
(node:26404) ExperimentalWarning: buffer.File is an experimental feature and might change at any time
...

DJS RPC

```js const RPC = require("discord-rpc"); const rpc = new RPC.Client({ transport: "ipc" }); const { RPC_CLIENT_ID,...

Creating a message based on Roles

I'm trying to create a message which is essentially a lineup of all players. I'm trying to do this task by fetching their roles from Discord Server. Problem happens when using a command that message needs to be updated due to some changes and it misses few people even though proper roles are present. const role = interaction.guild.roles.cache.find(role => role.id === teamRoleIDs[i]); const totalMembers = role.members.map(m => m.id);...

permissions

I need to give my bot perfect permissions and I know which to opt in for, but Idk what "use embedded activities" does, if its something simple, please tell me in brief

How can i make a captcha system like this?

I want to make a captcha system so that people can't just add an auto typer or macro to get inf. money

discordjs/voice & Basic HTTP Authentication

Howdy, Can I pass a username and password to createAudioResource to satisfy basic http authentication? Or do I need to request the endpoint through something like F🔊🔊etch and then pass the response body to createAudioResource....

Can't join voice channel

I am making a background music bot that joins a voice channel and plays, well background music. I copy-pasted the code from the documentation but it refuses to work. What am I doing wrong?

Cannot schedule event in the past

I gave this argument when creating my scheduled event:
scheduledStartTime: timestamp
scheduledStartTime: timestamp
The bot wrote this date in the message in my guild:
Saturday, 26 August 2023 15:00
Saturday, 26 August 2023 15:00
That is in a few minutes for me in my timezone, so it should be in the future....

Message.startThread: Missing Access

I'm doing something like this: ```js const client = new Client({ intents: [ // How many flags do I need to start a new thread and attach it to the startmessage it's branching off of?...

Userinfo Command

```js if (check) { const user = await args.pick("member").catch(() => message.member.user); const joinedAt = Math.round(user.joinedAt / 1000); ...

train a bot

hey, I have an image generator bot, but I want to train this bot to give better quality and results according to the desired prompts, is this possible to make it? if it is, is there any video or sth?

Interaction/Button question

I have a quick question regarding interactions/buttons; If I post an embed with a button attached to it using Bot A, can Bot B listen for that button interaction (being clicked) and process it?...

Editing Message Rate Limits

Hey there, I noticed some interesting behavior when it comes to editing messages that I had some questions about. I noticed that when editing a webhook message (may also apply to non-webhook messages) quickly, discord.js handles the rate limits and the edits slowly catch up with time. However, I noticed that if one message is currently catching up with edits, and I send another webhook message and start editing that one, once the first message finishes being completely edited, the other one star...

invites

how can I get invite links of servers my bot is in?

Message Username

Hello, people! Is there a way to send messages using custom usernames and pfp urls? something like channel.send("message", embed, username: "boom", pfp_url: "boom.png" thank you...

Invite a Guest

I was just wondering if discord.js has a method for inviting a guest to a specific discord voice channel yet.

AbortError

Sometimes i get this error message, i want to know why this error occurs and how can i solve this ```AbortError: Request aborted at RequestHandler.abort (/home/container/node_modules/@discordjs/rest/node_modules/undici/lib/client.js:1391:44) at abort (/home/container/node_modules/@discordjs/rest/node_modules/undici/lib/api/abort-signal.js:8:10) at self.<computed> (/home/container/node_modules/@discordjs/rest/node_modules/undici/lib/api/abort-signal.js:29:5)...

@discordjs/opus issue when rebuilding for electron

```javascript const { OpusEncoder } = require('@discordjs/opus') ... /* decode raw OPUS packets into raw PCM/interleaved/signed-int16/little-endian data */ if (this.opusEncoder === null)...

Discord refusing to add user to channel when channel is moved to another category

Im honestly not even sure what to do anymore iv tried a lot of different methods and none seem to work. In short i have a escelate command for my ticket system, It mvoes the ticket, sends the messages, however it removes the user from the channel whenever moved to another category. I tried to get around this by re adding the user and well, it does not work. Any help is greatly appreciated ```js const { SlashCommandBuilder,...