How to remove role from user in guild discordjs V12?

I have an economy system on my discord server and players can buy VIP for 30 days. Data are saved in firestore cloud database. The bot checks every 4 hours if someone has over his VIP and it should …

How to access property of a property of a JSON object if the initial property is a variable?

I am making a discord bot and have successfully made a system where it stores user’s variables in a JSON file in this format: { “801479782613123123”: { “status”: true }, &…

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 let …

UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Role in my code

I have a few lines of code that are causing issues, role = await message.guild.roles.cache.find(role => role.name = “Muted”); member.roles.add(role.id); This produces the following error:…

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 …

TypeError: Cannot read property ‘readFileSync’ of undefined NodeJS dom-parser

Trying to use Dom-Parser with Discord.js. Couldn’t find help from any where else. Error on line 15 fs.readFile I also had a lot problems getting fs working. First it wasn’t defined then it could not …

discord.js eval command returning [object Map] and [object Object]

so I have my eval command, however when I run such things as an eval to set status or something like that, it returns either [object Object] or [object Map]. I have fixed the previous error with […

Reason after blacklisting command Discord.js

I want to add a reason to my blacklists (with the command !blacklist {userid} {reason}) which are visible in the embeds below like .addField (“💬 Reason:”, somecode) how can I fix this? if …

Discord Intents discord.js

I am trying to use this – new Discord.Client({ws:{intents: [Intents.FLAGS.GUILD_PRESENCES]}}); I am experiencing issues. See the attached image. Anyone know what wrong? Thanks!

how to add reason in discord.js ban and kick command with commando framework?

I’m currently working on a discord.js bot with commando (which is the official framework/commands handler from the discord.js creator) I have researched this subject on various websites and nothing …