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

PERMISIONS BITFIELD

someone has an idea how to write it better and also make this thing work? im checking for names instead of bitfield and I need to return a string at the end of the day to let the user know what permissions are missing: ``` const requiredPermissions = [ PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.ManageChannels,...

AutoModerationActionExecution event

```js client.on(Events.AutoModerationActionExecution, async (autoModerationActionExecution) => { try { console.log('AutoModerationActionExecution event triggered:'); ...

Send multiple attachments with spoilers at the same time

. I'm trying to send multiple attachments with a spoiler at the same time, this is what I have currently, but on the webhook it only send the first attachment only...

Store a command

Hi, i wanted to create with my bot a sistem that can store how many times a user write a command, how can i do this?

Cannot set guild permissions to command

Hello, I'm following the doc to set custom permissions to guild commands. https://discordjs.dev/docs/packages/discord.js/14.16.2/ApplicationCommandPermissionsManager:Class#set I reproduce the same line of code as the doc but I get an error. ...
No description

create a Discord bot with AI free

Hey guys! I’d like to create a Discord bot with AI functionality but without having to pay for APIs. Is there a way to do this? Are there any open-source AI models I could use?

About forum

I would like to write code that will notify you when a forum post is made, like this bot function.
No description

When listening to a rest request, can I use an async function?

I just read this: https://discordjs.guide/additional-info/changes-in-v14.html#apirequest And now I want to implement my own logger and may have to use an await statement - is this possible?...

awaitMessageComponent doesn't wait the set time

Hey there, I'm following the guide but I can't figure out why awaitMessageComponent doesn't wait for the set time. Here's my code: ``` const { SlashCommandBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, PermissionFlagsBits } = require('discord.js');...

Execute command on button interaction

For example, if I have a command that rolls a dice and takes the number of sides as an optional input, would it be possible to setup two buttons to run the command again? One button would be to roll again with the same number of sides and the second would be to roll a d6

Unexpected error for me.

So I have a slashcommands and commands folder where I keep the slashcommands and the prefix commands. And in the slashcommands the commands are bugging. Like all the old commands I used before updating everything, there are 2 of them and neither of them work and the new ones i made today doesnt even work, but in the commands it works. Could anyone explain to me what I did wrong. Here is the index.js: https://sourceb.in/u33AJ7UBKo I think the problem is in here

Get who used a /command on another bot

Hi, I have a bot (Bot1) in our server that i'm trying to create a leaderboard of how many times each user has used a particular slash command (lets call it "/command") The bot in question is a third party bot, so not one that we have control over unfortunately. We have a custom bot (Bot2) that we use for a number of things in the server and I was wondering if there is a way to get the user ID of the person that triggered "/command" on Bot1, so that Bot2 can log the command use in "commandleaderboard.json"...

Discordjs package Check permission

In the discord.js package, how do I check if, for example, permission '1032' is Administrator? I didn't find anything that tells me this in the package version.

forum post reaction + join

hello i am trying to make it so my bot will automatically join new forum posts in the server. my code can be found below: ```js if (message.author.bot) return; console.log('message recieved') ...

does the bot log out after some time

when using
client.login(token);
client.login(token);
does the bot log out after some time? do i need to keep my computer on in order for the bot to stay online? i literally just started with this so sorry if this is a dumb question 😔...

slash command issue

I have command called /ping and its loaded correctly but my bot is not showing/can't it ```js const commandFolders = fs.readdirSync("./commands"); ...

"Unkown command" when using context command

so heres my code i've no idea why the context command says unkown command

lil doubt

like i wanna make a slash command when i use that slash command while replying to some guy, the message i am replying to should get deleted