Unable to send an embed
Hi, my code is practically the one that is included in the guide. I added a command which exports, during the execute phase an embed. When I try to post it into a specific channel from the index.js file there is an error I can't fix
There is a document that has both the addAnime.js file and the index.js file along with the error I get...
client dereference error
After I've constructed the index code like this, I try to load it from a slashcommand file in the commands folder, but I get a circular reference error. What can I do to fix this?
```js
const { Client, REST, Routes, Collection} = require('discord.js');
...
Threads not auto archiving
This could be a discord issue but i am out of ideas on my side tbh.
My bot creates a form channel with an auto archive duration of 3 days.
For testing purpose it is set to 1h, that way i do not have to wait too long.
On my main and test server where i run the tests for the bot, i noticed that Discord does NOT in fact archive any old form posts. I checked if maybe a bot sent a message in there or something but i don't see any messages there.
It also could't be a discord permission issue, as the bot has administrator....
Global commands not deploying
``javascript
// and deploy your commands!
(async () => {
try {
console.log(
Started refreshing ${commands.length} application (/) commands.`);...Subscription's question
I have a question about subscribing to a server.
What happens to the subscription and entitlement if the user who subscribed to the subscription deletes their Discord account?...
how to i listen for dm messages
client.on(Events.MessageCreate, async (interaction) => {
console.log(interaction)
});
client.on(Events.MessageCreate, async (interaction) => {
console.log(interaction)
});
TypeError: setTimeout is not a function using error when using discord-rpc in electron
Hi! I'm trying to use https://github.com/discordjs/RPC#readme, but have gotten stuck at a specific part.
When i run my standalone test for my RPC interaction file, my code works properly. (seen below)
```
import { Client, Subscription, User } from 'discord-rpc';
import { EventEmitter } from 'events';...
Slashcommand permissions
Does discordjs have any functions to have permissions on slash commands, for examply if user doesn't have staff role he can't use that command or it doesn't show on roles? Thanks
Read Desc
Is it possible to build emojis directly into the JS bot so that you don't have to upload them to the Discord server?
PermissionOverwrites Why did this stop working?
```ts
if (auditLogEntry.action !== AuditLogEvent.ChannelOverwriteDelete) return;
const changes = auditLogEntry.changes
const target = await guild.channels.fetch(auditLogEntry.targetId).catch(() => null)
const overwriteId = auditLogEntry.changes.find(change => change.key === 'id')?.old;...
Series of component interactions
I have a flow in which I need a user to start with a context menu command, then I display a select menu with a set of categories, then display a set of roles based on the category selection, then add the role to the member the context command was used on.
I was working on using collectors to do this, and I can get through the first one without issue, but I cant figgure out how to do the second menu succesfully.
```ts...
Update from v13 to 14
So, I'm looking to update one of my bots from Djs v13 to v14, but the issue with doing so is within one of my packages that uses the "ReadableStream" object/class and when using Djs v14, this returns an error saying it's undefined, can anyone help? I can send my package.json and package-lock.json files as well if that helps any.
Get attachment from command after modal submit
Hi there :waveBoye:
I'm currently working on a small
/bug report
command for a friend of mine. For now, it works like this:
- 1
Call the command and attach an Image (via .addAttachmentOption
)
- 2
Hit enter. Modal shows up > More info to add! Submit and done.
So, here's my question: What is the easiest way of getting an attachment url for an embed that'll be send to a private channel?...Any way to check if the bot has sufficient perms to execute a command with SlashCommandBuilder()?
setDefaultMemberPermissions() exists but it only checks the executing user's perms. I also want to add perm checks for my bot.
Discord.js Error with my dropdown menu and button
Hello, i want to ahev every choice = command
So : If I choice a option, he send me the command
error : ❌ Une erreur est survenue....

Unknown interaction
https://srcb.in/BSONkdUQ1S
https://srcb.in/X3YTyb6NA0
It's giving unknown interaction error
When I use buttons it works but when I selectmenu it gives error...
rate limit
Can someone explain in detail how the ratelimit using discord.js works
1. What methods/requests are counting for the api?
2. Do /commands also count?
3. Is there a built in way on discord js to queue requests and send them by chunks each second?...