Error deploying commands following the JS guide
I'm following the guide provided by Discord JS. When I run the command "node deploy-commands.js", I get an error message that prevents me from seeing slashCommands on my test server bot.
PS F:\xxxxxxx> node deploy-commands.js
Started refreshing 1 application (/) commands.
DiscordAPIError[10002]: Unknown Application...
Discord SKU ID errors
Not sure if this is DJS-related enough but since today I am getting the following error:
components[1].components[0].sku_id[BUTTON_COMPONENT_INVALID_APPLICATION]: The application for this SKU does not exists or does not match the message author
The SKU ID is 1164974692889808999, which exists under the bot running the code.
Code is as follows:
```js...
ESLint (VSCodium) error after using `npm create discord-bot`
Hello, I created a bot using ...
npm create discord-bot
and am using the ESLint VSCodium extension. however I am running into an issue in ping.ts
, where I am getting an ESLint error:
Parsing error: ESLint was configured to run on `<bot directory>/src/commands/ping.ts` using `parserOptions.project`: <tsconfigRootDir>/tsconfig.eslint.json
However, that TSConfig does not include this file.
Parsing error: ESLint was configured to run on `<bot directory>/src/commands/ping.ts` using `parserOptions.project`: <tsconfigRootDir>/tsconfig.eslint.json
However, that TSConfig does not include this file.
why are video_quality_mode and rtc_region missing in auditLogEntry.changes keys?
```typescript
const event: Event<Events.GuildAuditLogEntryCreate> = {
name: Events.GuildAuditLogEntryCreate,
async execute(auditLogEntry, guild) {
if (auditLogEntry.action !== AuditLogEvent.ChannelUpdate) return...
Token invalid
hello, im new to discord js and still confused on how and where to put my apps tokens in. picture below
Bot crashed with the following error, how to prevent?
connection may have been finicky but my bot just crashed with the following error:
```ts
1062 | break;
1063 | }...
Uncaught exception: ConnectTimeoutError: Connect Timeout Error
Keep getting this, hosting on my own server. It worked, then somehow it couldn't connect to a new shard since then couldn't launch the bot, kinda strange.
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;...