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

Bot no register slash commands

Tried: reinviting the bot with scopes enabled, testing with ping command in docs example(it worked), using applicationGuildCommand() as well, but to no avail.

Building .exe file with pkg results in "Failed to make bytecode"

Hey, I'm trying to build my node discord.js project into .exe file for ease of use. I managed to do so with https://www.npmjs.com/package/pkg by simply running it with pkg . --targets node18-win-x64 and below configuration: ```js "pkg": { "scripts": "commands/*/.js" }...

Made a command for user information, gives an error

Made a command for user information, gives an error ``` Error [GuildMembersTimeout]: Members didn't arrive in time. at Timeout._onTimeout (C:\Users\User\Desktop\Discord BOT JS\node_modules\discord.js\src\managers\GuildMemberManager.js:267:16)...

Getting data from Oauth2

Im currently trying to get data from an Oauth2 onto a seperate website, but everything I find says to host a new website off your computer, which isnt what I want. Any way to do this?

trying to create a message counting bot

just as a starting creation im trying to make a bot that can count how many messages a person has sent in a certain amount of time

@discordjs/rest requests behave differently when deployed to a serverless node environment vs. local

Using @discordjs/rest to create a standalone node project in an express-like API, await api.interactions.defer() hangs and never completes when running in an edge environment. is there a way to disable queued requests and always make the REST client that I create make requests sequentially? I can't even see the errors being thrown or if the request is being cancelled....

Edit message according to selected value

Hello, I've created an embed and a selectMenu just below it and I'd like to modify the embed (and therefore the message) according to the value chosen. I've tried something but it doesn't work Could you please help me? ...

Buttons

I made a team for voting, it works. I made the code to make the buttons work - they don't work Command ```js const { SlashCommandBuilder, PermissionFlagsBits, ChatInputCommandInteraction, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');...

Attaching local image file to embed

``js const imageFile = new AttachmentBuilder(../../assets/war_ranks/${warRank}.png, { name: ${warRank}.png }); const embed= new EmbedBuilder() .setTitle([${tag}] ${name}`)...

DMs with shards

On which shard would interactions from dm channels be received?

v14 reactions adding

how to add reactions to you're command like /hi he says hi, how are you with a reaction like a thumb i am beginner at this so i need to learn things...

having a few issues with this command?

```javascript const { bold, SlashCommandBuilder, EmbedBuilder } = require('discord.js'); const dayjs = require('dayjs'); const advancedFormat = require('dayjs/plugin/advancedFormat'); dayjs.extend(advancedFormat);...

Property 'getMember' does not exist on type 'Omit<CommandInteractionOptionResolver<CacheType>, ...

Property 'getMember' does not exist on type 'Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused" | "getMentionable" | "getRole" | "getAttachment" | ... 6 more ... | "getSubcommand">'.
const detailUser = ((interaction.options.getMember("user")));
const detailUser = ((interaction.options.getMember("user")));
...

Accessing Specific Guild from Bot's Cache is not working

I hope this message finds you well. I am currently facing an issue with my Discord bot, and I'm seeking some guidance from the community. Here's the problem I'm encountering: 1. When my bot joins a new guild, I can successfully access that guild using the Events.GuildCreate event. I retrieve it from the cache using client.guilds.cache....

Help

I wanted to make an eventHendler using a table. I did everything according to the guide on YouTube, but it doesn't work, there are no errors. index.js ```js const { Client, GatewayIntentBits, Partials, Collection } = require("discord.js");...

how do know how many channels my bot connected ?

I used this code before but now I don't know
client.voice.connection.size
client.voice.connection.size
...

GuildMemberRemove and roles

Hi, may someone tell me if the Member from GuildMemberRemove event has the role property with roles before they leave the server?

Discord Bot ID Locker problem

I have a problem with my discord bot that locked my other discord bots id so that you can sell them, i received a small template from a person with commands and api, the last few months i have expanded it with a product system, that means if someone a bot buys then i do /addproduct (user) (product entered in a json file). The problem now is that I got a command from my friend that says /changeguildid (productid) (guildid of the customer's discord server) but it doesn't work like I thought it would, I don't know exactly how to add the productid that it works. I can post the code below. the console.log outputs are german ignore it index.js...