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

Automod System

so yesterday I was making an automod system and I realized this: If a user reaches 3 auto warnings, gets auto timeouted, then I manually untimeout them, then that person says anything (anything, even if the word in not in the array of bannedWords) the bot will timeout them like if they had 5 auto warnings code:...

discord.js message in a function

how can i make a function that i can xall at any time and it will alow me to send a certain message

Help fr

Error fetching leaderboard: CombinedError (3) Received one or more errors 1 ExpectedValidationError > s.literal(V)
| Expected values to be equals...

Attachments

do attachments not work? whenever i try one, it returns the error ```js node:events:491 throw er; // Unhandled 'error' event ^...

gen bots are against tos?

Just question i want know answer =()

application commands

i have a question, how do i register new application commands when i create. coz if i want to register them i have to readd the bot.

How make the bot online?

I need start code, in discord.js start code in typescript I need in js

Deferrals

I've had a few issues as I have started to try and learn deferring and avoiding timeout errors. Many scripts that worked before now only work half the time. Often I get the discord API error for 10062 which I understand means it usually took longer than 3 seconds to respond, then it times out. I also am self hosting this bot for testing purposes and have a less than optimal connection. However, all these commands worked fine previously so I want to make sure its not something in my amateur code. More than anything Im just wanting to verify whether or not Im approaching this correctly or if its a strange issues because of my subpar connection speeds. Ive been through the documentation and cant seem to find what I'm doing wrong, if anything at all. I've tried a few variations of things, sometimes with half sucess, but this is an example code thats having the problem right now and crashing for the api 10062 error:...

Ban command.

How do I make my ban command work with Banning their Discord ID and when you mention them within the slash command. https://pastebin.com/iqeQZJbP

Automod

I have an issue with my automod system, if any Proficient, mod or higher can help me, I can DM them the pastebin link with it's password (Code is closed source) Need to go right now so if I don't respond that's why...

How to create a new channel for a guild?

I have a bot that will create a text channel to write into when invited. My question is how can I do this with discord.js? More specifically. I have this code that I have written by just exploring the API: ```ts const guild = await client.guilds.cache.get("<some-id>"); guild?.channels.create({ name: "test",...

What are people using for sharding?

I recently moved over to the discord-hybrid-sharding library but I have mixed feelings on relying on this one library dependent on Discord.JS interoperability for such a critical piece of my platform.

Change message author as bot

I saw a channel that converts the user messages like a bot (in counting). I tried to recreate this using Discord JS but I wasn't able to. I tried to recreate the message and set the message.author.bot to true but it didn't work (obviously as it creates a new message instead of modifying it) Attached screenshots for reference...
No description

How can I make this menu appear after I click on the link?

How can I make this menu appear after I click on the link?
No description

how can I do this? and dps he answer

how can I do this? and dps he answer
No description

hosting on raspberry pi

running node index.js on my vscode works fine, no errors running it on my raspberry pi returns an error ``` node_modules/discord.js/src/client/BaseClient.js:29 userAgentAppendix: options.rest?.userAgentAppendix...

Why doesn't my bot always properly set/update a GuildMember's roles?

Since I'm developing an RPG bot and a lot of logic also requires guild members to have certain roles. I've had situations where, for example, a guild member needed to receive 1 specific guild role and lose 1 guild role but they would only receive the mentioned role. When I would reran the same exact code, it would execute properly. It's like on discord's side the role simply doesn't get added (or removed). Is it possible that this has something to do with caching? I've been investigating this issue for quite some time and the only reason I could think of why this is happening is because I'm passing around the guildMember object through my code and perhaps the cache is stale and it doesn't properly update?...

ticket

Hi guys! Everything seems to work about the code but when I try the general support menu, it gives me the error that the interaction did not work. Can someone look into it and help me where possible?

Mobile Status

I have tried to set the mobile status by doing the Discord iOS in ws/index.js but It doesn't seem to be working, is there any other way, I have also tried Discord Android same location. I am not sure if its my ready file that may be causing the mobile status not to appear but below I have attached my ready file as well, I did make a attepmt to add the location of the ws into my ready file ```js const AvonClientEvent = require("../../structures/Eventhandler"); const { Client, GatewayIntentBits, ActivityType } = require('discord.js');...