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

Mobile Status

I have tried to set the mobile status by doing the Discord iOS in ws/index.js but It doesn't seem to be working, is there any other way, I have also tried Discord Android same location. I am not sure if its my ready file that may be causing the mobile status not to appear but below I have attached my ready file as well, I did make a attepmt to add the location of the ws into my ready file ```js const AvonClientEvent = require("../../structures/Eventhandler"); const { Client, GatewayIntentBits, ActivityType } = require('discord.js');...

Auto menu

How can I make a menu that shows all channels or roles with discord.js ?

Context menu commands not adding to the Context menu or not updating

Hi, i'm trying to add / remove context menu commands to my bots, i create them similarly to the ones that works fine, but they won't get added to the context menus, and the commands i remove from the bot stays there. Do i have to do something on the server management side so that it gets refreshed ? or do i have to do something particular with the bot's code ? Thanks in advance !...

Message content intent gets denied multiple times.

I have a bot that's gonna hit 100 guilds soon and we have so much things that rely on that intent and we use slash commands. I don't understand why I'm getting denied. Can someone explain? This (and probably more) is what we need the intent for: - AFK - Levels (the length of your msg depends how much xp)...

Can someone fix this? Buttons are not working for this embed

```js client.on('interactionCreate', async (interaction) => { if (!interaction.isChatInputCommand()) return; if (interaction.commandName === 'expedition') {...

/home/container/src/commands/music/Play.js:21 try } ^SyntaxError: Unexpected token '}'

I'm having difficulty pinpointing which bracket is causing a syntax error in my code. I've tried various fixes, but I can't seem to resolve the issue. Could you offer some assistance? Your help would be greatly appreciated.

bot perms

anyone knows why is this not working? i don't have a handler, its on the start of the code right above the commands ```js...

bulk delete

I am using bulk delete and if there only 5 messages in the channel but I try to delete 100 it sends unkown message error as the other 95 messages its trying to delete arnt there as there are only 5 msgs if the user wants it to delete 50 messages for example, but only 25 messages have been sent, itll throw the Unknown Message error another 25 times...

Missing Access Error

I get this error: pretty sure it's from this code: ``` client.channels.fetch(BANKLOGCHANNEL).then(channel => {...
No description

It does not read the ready.js module when it is in the events folder.

I am not reading the ready.js file that is inside the events folder, which is marked to be read. I need help please

How to manage channel and role permissions for context menu commands ?

Hello ! I'm sorry if that's quite a beginner question but I'm trying to set some channel and role permissions for a context menu command and i'm very confused by the documentation : I try to use the setDefaultMemberPermissions method from ContextMenuCommandBuilder which apparently needs a permissions bit field, but how do i set it to be used only in a specific channel or/and by a specific role ? Thanks in advance !...

Button confirmation system

Hey, im trying to make a bot where when you click on a button the bot replies with another two buttons, so that you can either confirm to delete the message with the first button or to just cancel your action. I came up with the code in the picture but i cant figure out how to delete the reply and the first message when you click confirm.

InteractionCreate.js / deploy-command.js

so i put them both into deploy-commands.js right, https://pastebin.com/YkXsdYic and this is what my interactionCreate.js looks like: https://pastebin.com/e0K3iDHN...

how do you modularize your subcommands so their implementation is in different files?

can someone link me to a resource? https://discordjs.guide/slash-commands/advanced-creation.html#subcommands i understand you can .addSubcommand(<imported subcommand>.data) but how should the subcommand file look like? is it still SlashCommandBuilder or SlashCommandSubcommandBuilder?...

embeds[0].description[BASE_TYPE_REQUIRED]: This field is required V14

const banEmbed = { "content": "", "tts": false, "embeds": [ {...

Slash Command Parsing

Good morning, afternoon, and night to those it applies to. I'm attempting to make a slash command that can take a rather long string that includes Strings, Integers and Booleans, optional or not, and take said data onto a database. The option that I'm currently using is a new SlashCommandBuilder() with a long slew of methods after it to oddly specify said command. I'm wondering if there's a better way to do this... Node version: 16.13.0...

Make a website interact with discord

Hi, is it possible to make a website that interact with discord realtime, such as chatting, send file without widget

Module not found: Can't resolve 'worker_threads'

```js ./node_modules/@discordjs/ws/dist/index.js:113:0 Module not found: Can't resolve 'worker_threads' https://nextjs.org/docs/messages/module-not-found...

partial channels

i didnt get an answer in #djs-help-v14 so ill ask here if i have the Channel partial but have the Guilds intent, since Guilds caches all guild channels, would the only partial channels be DM Channels?...