Category : bots

Here’s my code: const userEmbed = new Discord.MessageEmbed() .setAuthor(mentionedUser.username, mentionedUser.displayAvatarURL()) .addFields( { name: ‘Created’, value: mentionedUser.createdAt.toUTCString(), inline: true }, { name: ‘Joined’, value: mentionedUser.joinedAt, inline: true }, << This line >> ) .setColor(‘#05e6ff’) .setTimestamp() .setFooter(`ID: ${mentionedUser.id}`) The mentionedUser var is just the user you mentioned (if none the mentionedUser is the author of the message/command) ..

Read more

I’ve been freaking out about this for a couple of days and I can’t understand the error I have already redone the code over and over again, in practice I am creating a ticket bot a simple channel that is created on the server at the beginning of the chat there ’embed pinned with the ..

Read more

I’m trying to make my command handler that allows to have files inside folders. For example, I’d have a folder named ./commands/moderation or maybe one named ./commands/fun, etc. How can I do it? My code looks like this but it only handles JavaScript files inside my ./commands folder. for (const file of commandFiles) { const ..

Read more

I made a discord bot that i want to check a minecraft server but the embed has this issue: UnhandledPromiseRejectionWarning: ReferenceError: execute is not defined my code: module.exports = { name: ‘mcserver’, description: ‘get information about a minecraft server’, execute(client, message, args, Discord){ const util = require(‘minecraft-server-util’); util.status(‘mc.procrafting.net’, {port: 25789, enableSRV: true, timeout: 5000, protocalVersion: ..

Read more

bot.on(‘message’, msg=> { if ( msg.content === "WhosMyWaifu"){ const embed = new Discord.MessageEmbed() msg.reply( embed.setImage(‘https://toppng.com/public/uploads/thumbnail/load-68-more-imagesgrid-view-me-dio-11563057753kl6hlthvsz.png’), embed.setColor(‘RANDOM’), embed.setFooter(msg.author.username), msg.channel.send(embed)); } }) //it sends the same thing twice, but when it sends the sound embed, it also says my username and "object, Object" Source: Ask Javascript..

Read more