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

Error: Unsupported MIME type: image/webp

Trying to do image manipulation with peoples avatars but it's throwing this when a static image of someones avatar is being displayed. When someone has a GIF as their avatar, it comes up but it's as a static image instead of actually a GIF. ```js const avatar = !member ? interaction.user.avatarURL() : member.avatarURL(); const user = !member ? interaction.user : member;...

opt is not defined

I already have all the database stuff handled, it's just the tags. The node version is in the error btw Node.js v18.3.0...

Commands not working

I made this discord bot about maybe 2 years ago I have recently started developing it again to use it as my final A level project everything seems to be doing well until I try execute commands they wont execute I dont know if it has something to do with the command handler being outdated or soemthing with the prefix Full code for refrence :https://replit.com/@MadlyJohn/Contbot-2 Using Version : "discord.js": "^12.5.3",...

Filter not picking up when a user interacts with a static message

```module.exports = { name: 'ruleVerify',
async execute(client){ ...

Handling DiscordJS API Errors

Hello everyone, I've been trying to handle API response errors to avoid my Bot to die once these occur, errors like character limit exceeded or too many options on a command, the problem is: I am not sure where can I capture these errors because using the function catch() only works on certain cases, for example on the put request only works when i have 25 options (the limit) if i have 26 it will not be captured by the catch and just kill the bot.

change clear-warns to remove-warn(id)

https://sourceb.in/6juwjNd0ng i want to know if theres a way to clear a certain warning instead of all of them...

Multi Guild Error Logs

https://sourceb.in/hmOEpNlIIk i have the schema, interactionCreate event, and set-up command in the sourcebin. it will send to the channel if I use a channel id but not if i use the database. the guild id and channel id are logged in mongo db but i still get the type error...

Ping NaNms

```js const { SlashCommandBuilder, Client, GatewayIntentBits, WebsocketOptions } = require('discord.js'); const client = new Client({ intents: [GatewayIntentBits.Guilds]}); module.exports = { data: new SlashCommandBuilder()...

State management

I'm building a bot and am wondering the best way to manage state within the app? For example, once a user executes a command we begin a flow that asks them various questions and then will provide them with a custom message at the end based on all of the answers they've given. Is there a standard to maintain state in discord.js that will allow us to keep all these answers? Thanks!

sending message when shard starts

Error [ShardingInProcess]: Shards are still being spawned.

Responding to interaction with a video from a URL

Hi, I have a database of videos that are all stored as links (all on the discord CDN and ending in .mp4). I want to respond to a ChatInputCommandInteraction with a video. At the moment I'm doing await i.reply({files: [new Attachment({url: row.content})]}), but that re-uploads the video to the Discord CDN rather than just showing it from the URL, which makes it slower. With images I know you can just provide a url and not have to reupload it, I assume this is possible with videos too? And also Attachment's constructor is private so its not ideal. ...

djs14 question

is it possible to create a command to set up a 'bot-logs' channel, for every server the bot is in? that way if the bot gets updated the dev can send the updates to the servers bot log channel?

Reply failing on button interaction, getting no errors

Just not sure what I did wrong here. Looks fine according to the discord API guide as far as I can tell. When I hit the yes button, I get an error in discord that says "This interaction failed."...

logic building question (flow chart included):

First of all, thank you so much for all of the help you guys have given me over the past couple days as I'm building this bot. New to discord.js and you have helped to make it a really fun and engaging experience to learn! I have a working embed, and I've done research into the discord.js to figure out if this was possible I think I've found a way to do what I want, but I wanted to know if this was a feasible way to get what I'm trying to do set up, or if there's another way I should go about it. ...

Icon in embed .addFields msg

How I may input this teeny-weeny icon to value in .addField in my embed msg. For example I have something like this: .addFields({ name: 'Account:', value: You have [here I want input my icon] }); Is it possible in djs v.13 ?...

Not sure why my embed is failing.

Hello! I have an embed that I'm putting together and I'm getting a TypeError that I'm not quite sure I understand. Could someone help me understand what the error is trying to say? ```TypeError: (intermediate value).setTitle(...).setDescription(...).setColor(...).setThumbnail(...).setTimestamp(...).addComponents is not a function at Object.execute (C:\Users\Owner\Desktop\BartleBot\src\commands\tools\quiz.js:31:8) at Object.execute (C:\Users\Owner\Desktop\BartleBot\src\events\client\interactionCreate.js:12:27)...