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

unknown interaction when trying to defer interaction

if deferring an interaction has a chance to fail how do i ensure that interactions are ALWAYS responded too?

No roles getting returned from interaction

I am trying to get role from a member on an interaction, but I get 0 roles returned while I have 3 roles assigned to myself: ```js import { SlashCommandBuilder } from 'discord.js' const question = { data: new SlashCommandBuilder()...

idk how to fix it

i just need help. also idk how to see what version it is.

Regex question

Would any one know the regex to detect hoisted names as well as unicode charectors names? I don't work with regex much so I wouldn't know how to go about this

.setActivity not working for me

``js client.on('ready', () => { client.user.setActivity('activity', { type: ActivityType.Watching }); console.log(${client.user.tag} has logged on.`) const channel = client.channels.cache.get('1234');...

Trying to create a game lobby of sorts

Hi, I'm trying to create a simple game with a discord bot and I want to have it create a sort of "game lobby" when the start game command is run. I have gotten to the point where when I call the start command I create an embed which shows a list of joined players, and then there are two buttons, one to join the game and one to start the game. When join is clicked, it updates the embed and stores the joined player in a set. My difficulty is when I want to send a message to all the joined players when anyone clicks the start button. I want to send an ephemeral message to each player but I am not sure how to do this. I also want to pass the set of joined players onto the slash command handler to continue the game logic....

create channel in another server when command ran in other server

i was wondering how i can run a command in one server and then create a channel in aonther server my dsicord bot is in

Very quick question

How many .addStringOptions can be added in a single command

multiple creation

Hello, I am creating a sports race manager and I am currently encountering a problem. When I create the first race everything goes well but when I create more races they are created several times (example: the 4th race created is created 4 times, the 5th 5 times, etc.) here are the diferents that are related to this problem. Thanks in advance. discord.js version : 14.12.1 | node version : v20.5.1 course.js : ```const { SlashCommandBuilder, ButtonBuilder,...

Multiple création

Hello, I am creating a sports race manager and I am currently encountering a problem. When I create the first race everything goes well but when I create more races they are created several times (example: the 4th race created is created 4 times, the 5th 5 times, etc.) here are the diferents that are related to this problem. Thanks in advance. discord.js version : 14.12.1 | node version : v20.5.1 course.js : ```const { SlashCommandBuilder, ButtonBuilder,...

Typing issues with discord.js

Having issues with the typings of discord.js on my TS project. ```ts node_modules/discord.js/typings/index.d.ts:1231:3 - error TS1128: Declaration or statement expected. ...

Snipe Command

This is the command: https://pastebin.com/bjBsV6Qb This is in my index.js:...

I'm trying to create a collector but it doesn't work

it is not getting past the collector.on('collect', i => { part
No description

Check if a user have the permission to execute a command.

Hello, I'm working on a ticket bot and I would like to have the same permissions for the close command and button. So I would like to check if the user have the permission in the integration tab, in the settings of discord server. But, it's only return true when a permission exist for that specific user. It's doesn't use everyone or role permisison. Did you have other alternative for me ? https://old.discordjs.dev/#/docs/discord.js/main/class/ApplicationCommandPermissionsManager?scrollTo=has ```js...

Registering commands

I need help with making the commands register

all online users

How to get number of online users?

Help me pls

how to create /profile command like this that showing badges and username , orfile , banner ...

In the GuildMemberRemove event, are the cached roles of the guild member all there?

Do I have that guarantee that when the GuildMemberRemove event fires that the <GuildMember> from the parameter has all the roles that they had right before leaving? If not, when are their roles cached exactly?