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

Receiving HTTP Requests

I want to be able to receive HTTP requests, do some processing on the JSON and then post that to a discord channel. Are there any docs about receiving HTTP requests? I only saw the docs about calling an API. How would I be able to get my discord server to just wait on incoming requests, and only do an action when that request is received. Thanks!

halp

first 15 lines: `const express = require("express"); const app = express(); app.listen(3000, () => { console.log("Project is running!");...

Pressing button results in TypeError: Cannot read properties of undefined (reading 'execute')

I will send the code for my interactionCreator.js, bot.js and deleteAll.js files below

Authenticate a discord-rpc app only once

i have managed to build a working discord-rpc app but every time i start it the popup comes up asking for permission, how can i save the permission so i only need to apply it once? i have almost no experience but cannot really find something googleing it

Running slash command returns "ExpectedConstraintError > s.number.lessThanOrEqual'

new SlashCommandBuilder() .setName('search') .setDescription('Search Test') .setDefaultPermission(true) .addStringOption(option =>...

Embed catalog

hey I want to create a command catalog for send embed with buttons to navigates the pages help me pls

Spotify Activity

Hi, Is there a way to retrieve the Spotify link of the currently playing song from a user's activity ? I can already retrieve the title and other infos using Presence.activities but I can't seem to find a URL....

What happens to threads that you lose access to?

Referring to https://discord.com/channels/222078108977594368/1138344816854433875 . I just had a try but it is not what i'm looking for specifically. When the bot loses a role for example, do i have to manually check in all channels if i still have access to threads?

Help with canvas

In the following code, the bot sends the canvas banner to the user in dm, but I want them to see the text under the user's logo in the middle, and it doesn't work for me 😦

HELP

In the following code, the bot sends the canvas banner to the user in dm, but I want them to see the text under the user's logo in the middle, and it doesn't work for me 😦

Emit command not emitting the event

Hello I'm making an 'Emit' command in order to test some event handlers. Here's my code : ```js // emit.js data: new SlashCommandBuilder()...

How to capture Mouse clicks on Channels in the Channel list in the left-side Panel?

Hi all, I am trying out the discord js guide and have tried out everything till https://discordjs.guide/creating-your-bot/event-handling.html#individual-event-files I would like to know which enum value of Events can be used to identify if an user has clicked on a Channel name. What I want to do is, when an user clicks on a channel on the channel list from the left side panel, give a modal window with a notice for a particular channel only. Not once, every time he clicks on it, the notice must pop up. Can this be done with Events?...

Slash Command Permission

Hello, I'm trying to set guild permissions to some of my slash commands but I am confused to why it's asking me for a bearer token and how do I obtain one.

Please try this command again later. Possible bug reported to bot developers.`TypeError: Cannot rea

I try to know about the shards but I got this error ```js const promises = [ client.shard.fetchClientValues('guilds.cache.size'),...

Thread access lost

What happens when the client loses access to the threads in the channel. Will cached threads be flushed? Which event is emitted, channelUpdate? Do i have to find out myself if i lost access, maybe through the perm overwrites?

How to make a command handler for both prefix commands and slash commands

I'm building a bot for me and my friends and we both prefer the prefix commands for example !command over the slash commands, since discord.jsv12 is there anything I would have to change to make a command handler for that or would it still be the same in v14?

Best way to delete certain guild commands.

I have this idea to use "modules" in my bot that you can enable and disable via a command or future dashboard. The way it works is by adding guild commands when enable a module and removing them when you disable it. However since I am working with multiple commands I do not know the best way to remove the commands. If anyone can help I would greatly appreciate it!

How to upgrade

Can i go straight from a v12 update to v14?

GatewayIntentBits.GuildMessages problem

I have a problem with the GatewayIntentBits.GuildMessages intention on my bot. For a week now, this intention has been using a lot of resources on my server for my bot. Basically, my bot always uses ≈150MB of memory, but memory usage is increasing and not stagnating: my bot has been active for 9 hours and is using 1GB of memory. And when I deactivate it, everything goes back to normal. If you have any answers to my questions...

Recoursive Error

I have this error that keeps reoccuring. It happens on random times and when nothing else is happening When and Why does it happen? How to prevent it from happening again?