Category "discord.js"

How to detect message content Discord.js?

I am working on a code for a Discord bot for my server, and I'm currently stumped on a magic 8 ball feature, go figure. I'm trying to get it to check if there i

I am making a discord.js bot and I want to know if there was an error

I am using the following code to figure out if there was an error. But I want to not run something if there was an error. I have tried to look it up and I could

setRateLimitPerUser does not exist

I'm creating a slow mode command for my discord bot. I create the bot with typescript and I wonder why setRateLimitPerUser does not exist. What can I use instea

How to make a button event handler in discord.js V.13

I create a function to send an embed message with a button and now I would like to create an event handler to detect when the button is clicked and execute a fu

Discord.Js Message Link

So I've looked through the discord.js docs. I'm not too good at reading docs but is there a way to get the url of the message that initiated the command like: c

DiscordJS V13 Mentioning a role

Can someone help me with these code? What I want to happen here is when an admin mentions a role, I want it to do nothing or maybe send a reply like "You mentio

Discord Music Bot Wont Boot

So Im making a discord music bot (not for public) and its based off some github code and I put it in and gives me this, I had the node:events problem and fixed

Zapier -> Discord embed. error 400 invalid JSON

I am trying to create a new custom request to post an embed from airtable to discord using Zapier custom request It is setup exactly as per the other 2 working

Is there a way to access the children of a CategoryChannel before it is deleted? [Discord.js]

I handle a channelDelete event in my discord bot. My original intent was to do the following: Listen for when a channel is deleted Check to see if its type equa

Discord.js client immediately crashing as soon as a member joins

I have a Discord bot that is supposed to check the user info of a server member as soon as they join. Yet, what happens as soon as a member joins is that the cl

Discord Bot Auto Deletes Links In certain Channels

im pretty new to javascript and i tried to get and modify a script that delete link if its not in the list, i tried multiple modification for hours but none suc

TypeError: Cannot read properties of undefined (reading 'createdTimestamp') discord.js

Basically i am trying to create a userinfo command for discord.js, i followed some tutorials and i seemed to make one, but i get this error saying: TypeError: C

trying to give role for voter top.gg

i'm trying to give top.gg voters role in my server but there's so many thing happened got me confused and i can't find any solution for it. full source code : h

How to set random colour in a discord.js embed

I have a discord bot and it works perfectly. My objective is that when I send the >help message, the bot chooses a random colour for the embed and sends it.

client.user.setActivity found as null? (Node.js)

I am trying to set the activity of my Discord bot as a "game" however the examples I've found online haven't helped at all. client.user.setActivity("what the bo

How to check if a message author has a role?

I am trying to code a bot for a game idea my friends and I have. The command I'm working on is the score adjuster. Obviously though, I only want moderators to h

discord.js disable “interaction failed”

If an interaction (for example button click) is not replied, discord will display “interaction failed” in the client What they expect you to do: int

Grabbing a message mention taking longer than expected (DJS V13)

I'm using message.mentions.members.first() but the problem is that when I ping a user, the bot replies after a long delay. Video: https://gyazo.com/a8739e60bb86

Discord JS - interactionCreate and messageCreate

I've been trying to use interactionCreate event, but somehow it's not working. I'm not sure why, and I didn't find exact documentation about this event, only th

The value is undefined. (Discord.js newest version and Node.js)

I have spent like 2 hours trying to debug this and I don't know what to do. I get the following error: connection.destroy ^ TypeError: Cannot read properties of