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

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’m 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

Vote Member détection : Command slash

Hello, I hope I'm in the right place! Code informations - Djs v14.14.1...
No description

Autocomplete Unknown Interaction

Whenever I paste a url into my autocomplete command I get Unknown Interaction, even though the command still runs. error: ```json DiscordAPIError[10062]: Unknown interaction...

Vote détection with slash command for a member

Hello, I hope I'm in the right place! I would like to make a system to detect when a user makes a slash command and give him 1 point. A 6h cooldown is set up....
No description

ERROR: Shard 29's Client took too long to become ready

I have a bot where it comes up with this error randomly and causes the bot to crash, I then need to restart the server. any ideas how to resolve? here's the sharding code: ...

InteractionCreate for autocomplete won't fire on some commands

Below is my code. There are no errors at all - on some commands the autocomplete works, on others nothing even prints for Events.InteractionCreate. My options have .setAutocomplete(true). Here is the map option. The code for it is the exact same for both of my commands: ```js .addStringOption((option) =>...
No description

dms not registering as a dm

hey, ive been trying to make this code from like a year ago work, but the channeltype.dm doesnt seem to be working -