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

Restrict slash cmds to admins and me

How would i make my slash commands only be available to admins of a server and to me? heres my slash cmd code ```js require('dotenv').config();...

Using Commands

my main discord account can access my bots commands but when i try to use commands from a second account nothing shows up for my bot, what would cause this to happen? Discord.js: 14.13.0 Node: 18.15.0 ...

Giveaway interection question

Hello , im new in discordjs, i actually download the foundation of discord bot from github, then on top of it i create my own commands... I am trying to make a giveaway, but interactionCreate doesn't sync the button, therefore currently i put my button interaction into my giveaway.js... Seek for some help on fixing the following: 1. how can i add button into interactionCreate.js?...
No description

InteractionAlreadyReplied even with catch

code:
await interaction.deferReply({ ephemeral: config.commands.leaderboard.ephemeral }).catch(() => {});
await interaction.deferReply({ ephemeral: config.commands.leaderboard.ephemeral }).catch(() => {});
When i use the leaderboard command i sometimes get this error:...

Doesn't DiscordAPI reflect the latest role position?

I made a test guild for my bots. The guild has this roles scoreboard(?) - Owner - Mod...

guildLeave fires on bot restart

Hi all, when I restart my bot the guildLeave event fires several times always reporting the same ids of some servers (which seem to not have the bot for a long time but I'm not sure) I'm using discord-hybrid-sharding with currently 7 active shards...

Voice messages

How to send an audio file as a voice message?

avatar options

I want it to get the target avatar when the command user put it in but if there is no target then it would get the command user avatar. It works fine when there is a target but doesnt when there is no target. I believe the problem area is this part "|| interaction.user.avatarURL()" when used on its own the avatar shows but when i put it in that line it doesnt work. ```js const { SlashCommandBuilder } = require('discord.js'); const { EmbedBuilder } = require('discord.js')...

(Looking for advice/tips) Developing a bot for my server

Hello, I'm pretty familiar with coding and how things somewhat work, and wanted to try my hand at making/developing a bot for my server. I have a concept for the bot listing all the different things I know I'd like it to have, but currently unsure on where I should really start or what I can narrow the list down to (as in whats possible within the current bot limits) -- any constructive/helpful suggestions would be much appreciated and help guide me in the right direction....

Error with deploying commands

I followed the discord.js guide and made my own command, but when I try and run node deploy-commands.js, it has an error with the dban.js file that i have made for my new command.

TS + D.JS Error - unable to get the options

Hi, I'm working with a CommandInteraction here & am trying to get the option values. I'm working in a Typescript bot and currently have this code written, but I get the following error 🤔 I've tried things like making the properties optional to no avail. It just doesn't think it exists....

member.pending and requirements

Does the GuildMember.pending will return true if the user has to wait the 10 minutes before talking or hasen't verified the email?

Webhook rate limit

Hi, my bot can't send webhook messages (promise not resolving) but using node-fetch it is sending them just fine. I thought there might be some issue with djs' rate limit handling for webhook endpoints but even after a full reboot, webhook messages are still not sending using webhook.send() which I find very weird, because manual sending using node-fetch just works without issues. Some additional information: - This happens every few days for at least an hour....

My information command does not respond. Please help

Here is my code; ```const { SlashCommandBuilder, EmbedBuilder, Embed } = require('discord.js'); module.exports = {...

Widget Channels

What are these? I've seen them in the Guild class but I don't know anything about them.

Deselection the option in select menu

hi, how do I uncheck the option after an interaction?

How to make gateway shards always reconnect.

Hello, currently shards stop reconnecting after few tries. What do change so they will keep on try to reconnect but maybe less often

How to cache and receive User Object

Hello, I'm currently trying to cache users by using
let test = client.users.cache
let test = client.users.cache
...

.setTimestamp is not a function

```js client.on("messageCreate", (message) => { if (message.content.startsWith("ping")) { const exampleEmbed = new EmbedBuilder() .setColor('#2ecc71') // lime green...

How to respond image for autocomplete?

Hi, I'm trying to build a similar discord bot with a slash command just like as a default one called "giphy" As you can see by trying '/giphy', as you type in some strings, you get the reponse containing arrays of images. As far as i know the responses should look like [{name:"Choice 1", value: "1"}, {name:"Choice 2", value: "2"}, ... , ]. and the users see names of each object....