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

Fetching all members

How would I fetch all users at once in a server?

Button functioning once

Code - https://srcshare.io/64978dcec50c534c8dbb3831 When I click the comeplay or edit-name button the first time, it works as intended. But if I click it again, it gets logged through the collector, but for example on the comeplay button when it gets to line 22 when the voice channel name should change; nothing happens. No errors get logged in the console, but on discord it does say "This interaction failed" (doesn't say it the first time). Any help would be appreciated.....

Used disallowed intents

I have all intents granted in my developer portal, but my app keeps throwing the error, "Used disallowed intents".

"config" is not defined

```ReferenceError: config is not defined at Object.<anonymous> (C:\Users\csj25\OneDrive\Desktop\discordbot\src\index.js:11:14) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32)...

Autocomplete options fields of the `/` command.

Good morning. I wanted to come and ask you a question about the autocompletion of the options fields of a / command. When applying autocompletion to a single option field: let's say I have the /help command with option => command, when I simply need to apply autocompletion to a single option field I manage to find the solution. However, I did some research, and when I want to apply autocompletion to several fields: Let's take the example of the /funny command, which takes the option => title, color and category, here I want to apply autocompletion to the color option and the category option but with different values ​​outside, I can't find how to achieve this. I thought of making a condition that checks if the focus option is the color option or if the focus option is the category option. But it doesn't work, I can't even get the option separately. Do you have an idea to guide me?...

Why I have numbers there?

Why I have numbers there instead nickname?

Get username not global username

When I receive a message I access to the property author where is it the username property but that not the pseudo that the global username used to add friend so I want to retrieve the pseudo

Viewing rate limits

When using @discordjs/core and @discordjs/rest is there any way to see my current limits and how many requests I'm allowed? I know it's handled internally by the library, but I'd like to have that info exposed somewhere

SyntaxError: Unexpected token < in JSON at position 0

I'm using a hosting api api to send an application to square but it is returning this error, it goes through everything but in the hour of sending to square it takes about 2 minutes and gives this error (I DON'T KNOW IF YOU CAN HELP ME)

How to update an embed after button click with new values?

My Code: https://sourceb.in/q1iy2h2Nfx I want to update my embed with the new page values etc. whenever the 'gelöst' or 'ungelöst' button is clicked so that I dont get Invalid Form Errors when sending the new embed. How could I do this? I know that my code is very messy at the point, I just wanted to get it to work before i make it clean. Thank you!...

Error: Not enough sessions remaining to generate 1 fragment; only 0 remaining; resets to 2023-06-24

Error: Not enough sessions remaining to generate 1 fragment; only 0 remaining; resets to 2023-06-24T16:50:10.923Z

how to make timelock command

i want to make like if no one use the command for 12h the command will auto run.

get a unknown webhook error.

Hello, I got a collector running on a message in my code 2048 so my buttons work. But sometimes there is a very small chance it goes erroring with unknown webhook error. I was unable to trace this error and was unable to intentionally recreate it. Is this a error on my side or discords side?

Get first message in thread with @discordjs/core

I'm able to get the last 50 messages in a thread with: ``` import { REST } from "@discordjs/rest"; import { ChannelsAPI } from "@discordjs/core"; ...

commands

So in a tutorial I watched, a guy was putting his commands in index.js, if I move the commands to another file, will it still work? The command: ```client.on('messageCreate', (message) => {...

how to detect an embed and then resend it

i want to do if the bot received the bot embed title call "wild pokémon has appeared!" then it will send message.

Discord bot button problem.

Hey guys I am trying to code a disocrd bot with slash-command that allow memebr to submit a screenshot which later on I Will accept it or reject it. In case I accept mysql operation will upload the photo to the db ALL IS GOOD the problem is As you can see from the attached image from terminal once I submit 2 request (2 screenshot.) if I click to any button Accept or reject -> it will accept all of them at the same time or reject!! ...

Message not being sent to a user's DMs

```JavaScript client.users.send(user, { embeds: [embed] });...