Category : discord.js

I am developing a bot, and in the command "help" I want that when the user reacts to an emoji, his reaction goes away and a new EMBED appears. informacaoL.on(‘collect’, r => { const embedinformacao = new Discord.MessageEmbed() .setAuthor(`${message.guild.name} – Ajuda`) .setDescription(`⭐ **UTEIS** !ajuda – Exibe o menu de ajuda. !server – Mostra status do ..

Read more

So I made a reload command that reloads pre existing commands without pulling the bot offline. But now I want to be able to do an update with new commands I have added. Here is my code I have now module.exports = { name: ‘reload’, aliasses: [‘restart’, ‘rl’], cooldown: 0, usage: `reload <category> <command>`, description: ..

Read more

i am making a Discord Bot. The bot is supposed to write to a channel specified (using a json) on which input the user gives . This is what i’ve come up with: client.on(“message”, message =>{ let parsed = JSON.parse(fs.readFileSync(‘roles.json’)); //<< Add/Remove Role >> if(message.channel.id == ‘842129346943516692’) { if(message.content.startsWith(“+”)) { var args = message.content.split(‘ ‘); ..

Read more

So in my discord bot,I want to find out a info of a member by using their id – like !userinfo 2355846847 or smth- like that ! But whenever I use client.users.cache.get(arguments[0] , it returns me an error saying cannot read property cache of undefined. callback :async (message,arguments,client,text) => { message.channel.startTyping(2) var target = message.mentions.users.first() ..

Read more

I have here a Permission Command for my Discord Bot but it says:"Illegal return statement". On here: return console.log(`Invalid Permissions ${perm}`); and return message.channel.send(`Missing Permissions: `${invalidPerms}“);. Full Code: const validPermissions = [ "CREATE_INSTANT_INVITE", "KICK_MEMBERS", "BAN_MEMBERS", "ADMINISTRATOR", "MANAGE_CHANNELS", "MANAGE_GUILD", "ADD_REACTIONS", "VIEW_AUDIT_LOG", "PRIORITY_SPEAKER", "STREAM", "VIEW_CHANNEL", "SEND_MESSAGES", "SEND_TTS_MESSAGES", "MANAGE_MESSAGES", "EMBED_LINKS", "ATTACH_FILES", "READ_MESSAGE_HISTORY", "MENTION_EVERYONE", "USE_EXTERNAL_EMOJIS", "VIEW_GUILD_INSIGHTS", "CONNECT", "SPEAK", "MUTE_MEMBERS", ..

Read more

I followed steps in guide of discord.js I added this on my models/Users.js module.exports = (sequelize, DataTypes) => { return sequelize.define(‘users’, { user_id: { type: DataTypes.STRING, primaryKey: true, }, balance: { type: DataTypes.INTEGER, defaultValue: 0, allowNull: false, }, bank: { type: DataTypes.INTEGER, defaultValue: 0, allowNull: false, }, }, { timestamps: false, }); }; And this ..

Read more