Category "discord.js"

Discord.js bot not logging in

I made a discord bot and i have no idea what's wrong with my code i mean look: const Discord = require("discord.js"); const client = new Discord.Client({ i

Problem with random embed messages discord.js

I am trying to do a command with random embeds, but when I trigger the command. It always sends the same option, and if I reload the bot, it's gonna choose a ne

Discord-xp / Canvacord Ranking system

I am having issues with my rank system, when I attempted to level up (by spamming), I started to notice that I don't actually reach the required amount of XP be

How I can update code from discord.js v12 to v13? - Welcome messages

I was watching YouTube tutorial about welcome messages. I copied whole code etc. When I'm using this code on discord.js v13 it doesn't work. When I use this cod

Error below TypeError: Cannot read properties of undefined (reading 'channels')

I have this small problem where I get the Cannot read properties of undefined error, but I don't know where the issue is. Can someone help me with this one? con

Mongoose.js not removing object from array

I'm using Mongoose with my Discord bot and I'm making the feature where the infractions can be removed from any mentioned user(s). The infractions are saved in

Random Meme Command (discord.js v12)

I'm trying to make a 'random meme' command for my Discord Bot. I'm new to working with APIs, but I've tried my best. The problem is, when I type the command, no

Getting All Elements In An Array (Javascript)

I am trying to check if a string contains certain words which I had stored in an array... however I'm new to JS, so I don't exactly know how to check all of the

DMing a specific user with ID

I went through other questions trying to find the answer to this and came to the following code: let Prayer = message.member.user.tag; bot.users.cache.get("my_

Ban all command not working for discord bot. (discord js)

I'm trying to make a ban all command for my bot and am having issues. When I try to use it, I get an error: DiscordAPTError: Missing Permissions This is my co

How can I deny @everyone and allow the author to view the channel?

I've been tinkering around with this for a while, and I have never done permission based channel creation. I am working on a ticket function for my bot and I ca

Discord.js Is there any way to get all users to separate variables?

Is there any way to get all id's of users in one server to separate variables?

Can't Connect Mongoose to MongoDB - There is no established connection with mongoose and a mongoose connection is required

I was looking around in Discord.JS and creating a bot, but every time I want to turn on the bot, ( using node index.js) this error happens: throw new Error("Th

i can`t repair this err: BITFIELD_INVALID

const { MessageEmbed } = require(`discord.js`) const Discord = require("discord.js"); const nodemon = require("nodemon"); const client = new Discord.Client({

My bot sending multiple messages, discord.js

To explain briefly, the code is to make already existing buttons after restart of the bot usable again, I store for this the channelId and the messageId. Howeve

Is there any way of connecting minecraft javaPlugin to discord javaScript bot?

So basiclly, I was making a minecraft plugin, and I want to add function that alows you to log in into serwer in minecraft only if you are on discord. But i don

Value not saving in mongodb

const serverS = await server.findOne({ guildID: message.guild.id }); serverS.settings[1]["links"] = true; serverS.save() The code I use ^^^^ So when it saves t

message.author.content not working discord.js

i tried to make a ping command for DM channel so if an author says ping in DM channel bot could reply pong but its not working, console is not giving any error

TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type Function

I have this little problem here: events.js:200 throw new errors.ERR_INVALID_ARG_TYPE('listener', 'Function', listener); ^ TypeError [ERR_INVALID_ARG_TY

How to search the database so that it does not show certain things (I do not know how to write it)

Discord.js 13.6.0 | Node.js 16.14.2 | Mongoose 6.2.3 I want to do so that my bot searches the database to see if the guild should be removed or added Example I