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

slash command type issue

./lib/types/command.ts: ```ts export type Command = { category: Category data: SlashCommandBuilder | SlashCommandSubcommandsOnlyBuilder | ContextMenuCommandBuilder execute?: (i: ChatInputCommandInteraction, client: Client) => void...

Vouch

I need a discord vouch bot /vouch /check vouches /vouch leaderboad

Guild#disableInvites returns 403

Hello! I am trying to enable disableInvites, but every time Guild#disableInvites is called, I get a missing access error (API error 50001 and error code 403). What permission (or intent?) do I need for my bot to turn off invites?

Get all users which have permission "Connect" on false in a specific voice channel

The goal is to create a list of all users which have permission "Connect" on false in a voice channel... Still no idea? ```js //fetch guild members await guild.members.fetch();...

this interaction failed

idk for some reason one of my button on my embed doesnt work , i tried almost everything for straight up several housrs , im kinda clueless now

Get All users banners

So im trying to get all banners of server members.. what im doing is fetching all members let members = await guild.members.fetch(); but all the members here have banners as null. ik they need to be force fetched. so i tried something like this ```js let banners = [];...

Upgrade help from 11.3 to 14

Guys help me please upgrade my index.js file, it written in 11.3 version, for that I get error : require('dotenv').config(); // Load .env file const axios = require('axios'); const Discord = require('discord.js'); const client = new Discord.Client();...

do not remove the role

I don't know why, but it doesn't take a role, and it should. https://pastebin.com/xgayACxE it code...

How to create an event that fires on express server PUSH

I am creating a discord bot that will allow me to verify a player in my mobile game when a player enters their discord name into the verify form on my game it will send a push request to an http server made with express. How can i create an event that will fire on that PUSH that will message the player with that discord name if they would like to verify?

Problems with the Export of modules in v14

Only one Funktion is getting executed and the other not, what can i do?

Issue with Discord.js command deployment script

The script is designed to deploy application commands to a Discord bot, but it doesn't seem to complete successfully. It gets stuck after resetting the guild commands, and the process doesn't finish or show the final success message. I have checked the code, but I'm unable to figure out the root cause of this problem. Below is my code (It was heavily inspired from the https://discordjs.guide/creating-your-bot/command-deployment.html#guild-commands guide ) Here's the code: https://pastebin.com/sBK7nKJV...

Problems with the Export of modules in v14

Only one Funktion is getting executed and the other not, what can i do?

New slash commands not registering

Two of my slash commands (new ones, created after the last deployment) are not being registered. I checked that the array I use for the deployment does include them, yet they are still not being registered. Example code of one of the slash command files ```javascript const config = require('../config.json');...

Applications commands are registered throug rest api but not working

Hello, I am having a bit of a problem.. I a file named command.handler.ts. This file is responsible for loading commands and registration of them through the rest api. This works fine and my test command is also available in my server. However, when I execute the command nothing happens. I am not also not getting any output when I try to console.log(). The event for INTERACTION_CREATE is also being registered.. so I am not getting why it does not work...

`channel.permissionsFor()` does not take timed out guild member permissions into consideration

According to docs, timed out members should have lost all permissions except VIEW_CHANNEL and READ_MESSAGE_HISTORY, if they do not have ADMINISTRATOR permission. However, channel.permissionsFor() and guildMember.permissions do not reflect the permission changes on timeouts. I understand that we can check if a guild member is timed out with guildMember.isCommunicationDisabled() and many other...

Slash Command - Webhook Avatar Not Setting Correctly to User's Avatar

I'm facing an issue where the webhook's avatar is not being set correctly to the user's avatar. Instead, it appears to be blank or set to the default Discord avatar. Expected Behavior: The webhook's avatar should be set to the same avatar as the user who executed the command, making it easy to identify which user initiated the /echo command. ...

How to make embeds send correctly

Hey! I've been failing to make this embed send correctly. I'm trying to make code to sends multiple embeds whenever it reaches the limit (25), but I'm testing this code with a limit of 5 since I don't have > 25 data points....

How to make SlashCommand Args

Trying to make an Integer arg for a slash command but it is giving me a weird error.

Bot not coming online

My bot does not come online when i run this code ```js const { Client, GatewayIntentBits } = require('discord.js'); require('dotenv/config'); ...