discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with Discord's apps API.

Join

djs-questions

djs-voice

subtexts no work in descriptions

is it just me or does subtext (-#) not work in descriptions?

ERROR: Cannot message this thread until after the post author has sent an initial message

I'm trying to send a message right after a thread creation. But sometimes i receive this error: Error sending message in thread: DiscordAPIError[40058]: Cannot message this thread until after the post author has sent an initial message. I believe that discord has some small delay to publish the author message, due that i guess i have to wait for something but i dont know what do i have to listen for....

My bot does not detect dm messages

I am using discord.js v14, it only detects guild messages, how can I detect dm messages?

discord.js won't play nice with ES:LINT

`` ./node_modules/discord.js/typings/index.d.ts:1301:21 Type error: Type parameter declaration expected. 1299 | * If the user were to pass only one of those channel types, the Extract<> would resolve to never`....

Clear the select menu options.

I want to clear the select menu options when the bot logs the role to the DB.

GuildMemberAdd event not working.

```JS const { Events } = require('discord.js'); const fs = require("fs"); module.exports = {...

help for discord sdk

there is Fetching a channel using the SDK on discord dev docs i was just using that code but then channel or avatar is not working for me
No description

User inviting and user roles

Hi guys I have a website today where I sell a product, and I want to set up a channel on discord for support, but I would like to be able to add only the user who is using the product to the channel through the website, and if they stop using the product, remove them from the channel or revoke their permission to view the channels. Is there a source or article what explain this and where I can study this? I would like to control user access to the channel according to the user's purchase status on my application website....

Hello d, how can I make a stateless bot like the js bot?

Hello d, how can I make a stateless bot like the js bot?

basic setup with djs rpc

hey. i'm new to typescript (not programming) so bear with me i'm trying to get setup with discord-rpc but i'm running into this error: ``` Error: OAuth2 Authorization Error: Unknown Error at RPCClient._onRpcMessage (C:\Users\james.griggs\Desktop\i hate programming pt 2\typescript projects\testing-purposes\node_modules\discord-rpc\src\client.js:178:19)...

Trying to update channel name every min for utc time, updates once but stops updateing

sorry for long title I am trying to make a UTC time channel in my discord server (this is for a game rise of kingdoms which uses utc time), so I made a ClientReady ```JS...

(solved) Strange permissions error inside discordjs that I cant catch and cant replicate?

Once in a while I will receive a strange error from discordjs that will crash my entire bot, and a try/catch block in the area of my code that seems to cause the issue doesnt ever catch the error. Instead it seems to be internal to discordJS and unavoidable. ```js /Users/mistersircode/Documents/GitHub/Arthur/node_modules/@discordjs/rest/dist/index.js:727 throw new DiscordAPIError(data, "code" in data ? data.code : data.error, status, method, url, requestData);...

Channel id when bot joins a guild

Hi, I am trying to send a message to a channel when the bot joins a guild. I know how to send it to a system channel, but how can I handle the situation if a system channel is not set? Is there way to get the channel id the bot joined to, or do I just send the message to a random channel?

Cache Updating

I am trying to confirm if running await guild.members.fetch() will keep the member cache up to date for a particular guild. I seem to have different answers on this.
No description

Bot invited via User App or Server Invite?

Is it possible to get if the bot was invited via User App or added to a server?

EmbedBuilder thumbnail issue

My bot scrapes data from pages on archiveofourown.org and uses it to build an embed. Recent changes to their server structure have led to a change in their image hosting url convention. Previously, the icon for a collection, for example, would have been something like https://s3.amazonaws.com/otw-ao3-icons/collections/icons/1202098/standard.jpg And now it is:...

How do I send a message to a channel by channel id

```JS const channel = interaction.client.channels.fetch('1345305762481569822') if (interaction.options.getUser('member').bot) { await channel.send({embeds: [embed1]}) } else {...

need help, my bot seems to turn on & go online but no response from it with anything.

```js import { Client, Events, GatewayIntentBits } from 'discord.js'; const client = new Client({ intents: [GatewayIntentBits.Guilds] }); ...

Does discord check command permission?

Does discord check command permission before the command be executed when i set on SlashCommandBuilder object?

Logs not working

I am still kind of new to coding so please do not judge on that fact, but I've tried multiple things (events & audit logs) and only a few of my logs work (member joins and message edits).