discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with Discords apps API.

Join

djs-questions

djs-voice

Trying to change a channel name only works when my bot gets the admin role.

I've got some simple DiscordJS code that is trying to set the name of a specific channel. The problem is that this only succeeds when i assign the bot the Administrator role. From what I read in the manual, having the Manage Channel role should be sufficient, but that doesn't seem to be the case. I made sure that the bot has server-wide MANAGE_CHANNEL rights, I have added the MANAGE_CHANNEL permission to the bot Role itself, and added it to both the channel category as well as the channel. ...

Message Component Collector is not collecting after String Select Menu Interaction

I have this function (handleMatchConfirmation), which replies to an interaction, then use the responseInteraction to create a Message Component Collector to collect the users' button interactions to change the message depending on their inputs (in this case, confirm or cancel a match, for example). It works as intended when the interaction passed is a ChatInputCommandInteraction (as in the first message of the picture), but when I try to execute the same function after the user selects an option in a StringSelectMenu (so passing a StringSelectMenuInteraction) even though it succesfully replies the message and creates the Message Component Collector, it fails to collect any button input (as in the second message in the picture), not even passing by the Message Filter. I will upload the function, as well as the logs produced by the executing using the ChatInputCommandInteraction and the StringSelectMenuInteraction, for comparison....
No description

AttachmentBuilder

Hi, could someone tell me what the attachmentbuilder is for please? I didn't understand it very well in the doc.

Slash commands not being created

Sorry I know this has been posted multiple times before and it must be getting old by now, but I read many posts and none of the answers I found worked for me. I am using the latest version of D.JS and Node. I have followed the tutorial to create a bot, but the slash commands simply don't show up at all. I tried restarting my Discord client several times, restarting the bot, removing the app, adding it back, etc. it just won't do anything. I am not sure what am I missing. When I run the deploy-commands.js file it says it worked successfully. I am, however, using a .env file, whereas the tutorial uses a .json file. But still I don't see how this changes anything. Let me know if you want any specific code or anything. Thanks for reading! Sorry again for the inconvenience....

Slash Options

Hello! How can I make it so that it displays the list of threads on the server here instead of just regular options?

Not in stage channel error when running setSupress(false) despite checking for stage channel?

So how am I supposed to resolve an error like this? Because from what I can tell, all the checks are correct 馃槀 Also, if it's not clear from the image, the erroring line is 383...
No description

Logs

Does anyone have an idea why the ban remove will log but none of the other guild events will?

Events.MessageCreate does not invoke

const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
```js client.on(Events.MessageCreate, message => {...

Role cache get undefined

``` const guild = client.guilds.cache.get('929288640142663720'); let roles = []; if (config.admin_role) { config.admin_role.forEach(async (role) => {...

Question about choices

How to put all guild channel in interaction option? Like this:
No description

ChatInputCommandInteraction vs CommandInteraction

Sorry but I'm so confused at what the difference between these two are. Can commands be called from elsewhere or something? Nothing in docs.

Latency off drastically

const latency = Date.now() - interaction.createdTimestamp;
const latency = Date.now() - interaction.createdTimestamp;
Why is the latency so off? First I got -72, then I got 4...
No description

guild applications

can discord.js bots view guild applications

Responding to a button interaction received from the gateway to launch activity

After configuring a button to launch an activity (within a message sent by the app's bot), the activity won't launch. Getting a 'This interaction failed' error message. Is specifying the interaction callback type = 12 not enough? Are there other parameters needed in the response object body (sent to the HTTP API) to launch the activity (i.e. client ID, bot token)?

Confused About Discord Invites: Are They Always Linked to the Original Creator?

I鈥檓 trying to understand how Discord invite links work ? Specifically: - Is each generated invite code always linked to the user who originally created it? - Does users can generate the same link ? - Can a code be shared around by multiple people, and does Discord still store the first user who made it?...

Setting buffer attachment not working. The resource must be a string, Buffer or a valid file stream

Hi, I am getting the error The resource must be a string, Buffer or a valid file stream. when trying to send file attachments from buffers. Why might this be happening?...
No description

Get Activity (Embedded Apps) in a channel

Is there a way to get information about currently ongoing activities (games created w/ embedded app SDK) in a channel? I'm currently trying to make a bot that intergrates with a custom app. Trying to search about activity is pretty hard as people refer to "activity" as the profile status.....

Working with Rest API

I'm trying to use REST for the first time, but I can't get it to work. I can't find any docs/references on how to perform actions with it. Right now I'm trying to move myself to a different voice channel, here's my code: ```ts import { REST, RESTOptions, Routes } from "discord.js"; import { config } from "./config.js"; ...

How to Create a nitroDetect with Discord.js V14.17.3?

I have searched a lot of information but I can't do anything. I just want to check which users have boosted Nitro (I already did this) but after a user has boosted once, when it comes to boosting a second time, I can't create a detection of how many times that user has boosted Nitro. Can anyone help me?

Small question

Maybe stupid question, but how to make this one?
No description
Next