Bot send a message if the User who clicked the reaction has the ROLE “ID” I decided to try this, but it didn’t work out ====Here is the main Code==== Answer You should check the role of the member who reacted (the member found in reaction.users.cache). reaction.users.cache returns a user, and you need a guild member to get their roles.
Tag: discord
My discord counting bot is Not doing server by server but every single server combined
I need help with a discord counting bot. Whatever server it is in, it has the same counter number. what I mean is that they are all paired and do the same count instead of it being server by server. Here is the main part (not all of it), I just need to learn to have the servers separate from
Check if a user can send message in a mentioned channel discord.js
I have a command which allows users to make the bot to say a message, but I would like it to be able to check whether the user is able to send messages in that channel before it sends it. Currently, I just have it locked to the MANAGE_MESSAGES permission. Here is the code: I have searched and couldn’t find
Discord.js bot joining voice channel but wont run the remaining code after joining
I have a discord bot that I’m trying to get to join a voice channel and have it repeat a sound file, so far I have got it to join but after it joins, none of the code in the arrow function is run This is the code I’m trying to run but it joins the channel and nothing after
UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Role in my code
I have a few lines of code that are causing issues, This produces the following error: I have no idea what the issue is and im really confused, any and all help is appreciated. Answer Dude you need to use === instead = in line 1!
Discord music bot: prefix not defined
I wanted to make a music discord bot and I’ve been having trouble with it for a while. and I keep getting an error and I got this code from CodeLyon’s video called “Make Your Own Discord Bot | Music Bot (Play, Skip, Stop Commands)” I keep getting the same error when I try it: ReferenceError: PREFIX is not defined
error when a non bot member comes online (presenceUpdate)
I am trying to get my bot to send this message when a bot goes online or offline. it works sometimes but when a human member comes online i get this error: UNCAUGHT EXCEPTION TypeError: Cannot read property ‘user’ of undefined. My code: Answer If we assume that this code is server side: Definitely you didn’t send newPresence in client
TypeError: Cannot read property ‘split’ of undefined in discord and nodejs
this is the error this is the code this line gives error let token = msg.content.split(‘ ‘); i have blanked it out this fetches giphy gif // Here we get the data array from the response object // We pass the array to showGiphs function // We use catch method for Error handling Answer You’re trying to call split on
Multiple if/else conditions (discord bot)
I’m trying to create a simple discord bot, currently using nodeJS. I’m creating specific commands that only specific users can use and whenever someone who does not have permission to use such command can get a reply “You don’t have permission”. (I hope you get the idea. sorry for the bad wording). This is my current code: But what happens
Inconsistent error when checking for user ID’s while using partials as well. (Discord.js)
The code below is the code I am using to track deleted and edited messages. However, when I try to check the user ID (because sometimes, discord bots like groovy constantly delete and edit messages …