diff --git a/README.md b/README.md index ae04f07..4121563 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -# discord.js-v13-slash-commands -Creating slash commands for discord.js v13 bot +# Discord.js v13 Balance Slash Command +balance slash command of discord.js v13 +Youtube tutorial: [Click here to watch video](https://www.youtube.com/watch?v=a96JUBiUbMY&t=4s) ### Subscribe our YouTube Channel [Cody Dimensions Youtube channel](https://www.youtube.com/channel/UChCwEZuaY3fsYRLp5WZ3ZJg) diff --git a/Slash Command Handler/.env b/Slash Command Handler/.env deleted file mode 100644 index a86e185..0000000 --- a/Slash Command Handler/.env +++ /dev/null @@ -1,3 +0,0 @@ -token= -guild= -application_id= diff --git a/Slash Command Handler/commands/info/ping.js b/Slash Command Handler/commands/info/ping.js deleted file mode 100644 index 9163dcb..0000000 --- a/Slash Command Handler/commands/info/ping.js +++ /dev/null @@ -1,10 +0,0 @@ -const { Client, Message } = require('discord.js'); - -module.exports = { - name: 'ping', - description: 'Returns bot ping.', - run: async(client, message, args) => { - const msg = await message.channel.send('Pinging...') - await msg.edit(`Pong! **${client.ws.ping} ms**`) - } -} \ No newline at end of file diff --git a/Slash Command Handler/commands/moderation/ban.js b/Slash Command Handler/commands/moderation/ban.js deleted file mode 100644 index 2d2d923..0000000 --- a/Slash Command Handler/commands/moderation/ban.js +++ /dev/null @@ -1,57 +0,0 @@ -const { MessageEmbed } = require('discord.js'); - -module.exports = { - name: 'ban', - description: 'Ban a user from the server. ', - run: async(client, message, args) => { - const mentionedMember = message.mentions.members.first() || message.guild.members.cache.get(args[0]) //find the member with id or with mention - const reason = args.slice(1).join(' ') //join the arguments you write as reason of banning the member - - if(!mentionedMember) return message.reply('**Please specify a member!**') //if you didn't mention the user you wanna ban, return this msg - - if(!message.member.permissions.has('BAN_MEMBERS')) { //if you (user) don't have ban member permission then - const banError = new MessageEmbed() - .setDescription('**You don\'t have permissions to ban members!**') - return message.channel.send({ embeds: [banError] }) //return this embed - - } else if(!message.guild.me.permissions.has('BAN_MEMBERS')) { //if bot don't have ban member permission then - const banError1 = new MessageEmbed() - .setDescription('**I don\'t have permissions to ban members!**') - return message.channel.send({ embeds: [banError1] }) //return this embed - } - - const mentionedPosition = mentionedMember.roles.highest.position //the highest role of the mentioned member - const memberPosition = message.member.roles.highest.position //highest role of you - const botPosition = message.guild.me.roles.highest.position //highest role of the bot - - if(memberPosition <= mentionedPosition) { //if your role is lower or equals to the mentioned member u wanna ban - const banErr = new MessageEmbed() - .setDescription('**You cannot ban this member because their role is higher/equal to yours!**') - return message.channel.send({ embeds: [banErr] }) //return this embed - } else if (botPosition <= mentionedPosition) { //if bot role is lower or equals to the mentioned member u wanna ban - const banErr1 = new MessageEmbed() - .setDescription('**I cannot ban this member because their role is higher/equal to mine!**') - message.channel.send({ embeds: [banErr1] }) //return this embed - } - - try{ - const reasonDm = new MessageEmbed() //DM the banned user, tell him/her the reason of being banned - .setTitle(`You were banned by ${message.author.tag}!`) - .setDescription(`Reason: ${reason}`) - await mentionedMember.send({ embeds: [reasonDm] }) //send the embed to DM - await mentionedMember.ban({ reason: reason }).then(() => { //then ban the user - - const banSuccess = new MessageEmbed() - .setTitle(`${mentionedMember.user.tag} was banned\nby ${message.author.tag}`) - .setDescription(`Reason: ${reason}`) - message.channel.send({ embeds: [banSuccess] }) //send a message in channel that you banned that user - }) - - - } catch (error) { - const errorEmbed = new MessageEmbed() - .setDescription(':x: **There was an error while banning this user!**') - return message.channel.send({ embeds: [errorEmbed] }) //send an embed when it caught error - } - } -} \ No newline at end of file diff --git a/Slash Command Handler/commands/moderation/kick.js b/Slash Command Handler/commands/moderation/kick.js deleted file mode 100644 index 3cd15ed..0000000 --- a/Slash Command Handler/commands/moderation/kick.js +++ /dev/null @@ -1,57 +0,0 @@ -const { MessageEmbed } = require('discord.js'); - -module.exports = { - name: 'kick', - description: 'Kick a user from the server. ', - run: async(client, message, args) => { - const mentionedMember = message.mentions.members.first() || message.guild.members.cache.get(args[0]) //find the member with id or with mention - const reason = args.slice(1).join(' ') //join the arguments you write as reason of kicking the member - - if(!mentionedMember) return message.reply('**Please specify a member!**') //if you didn't mention the user you wanna kick, return this msg - - if(!message.member.permissions.has('KICK_MEMBERS')) { //if you (user) don't have kick member permission then - const kickError = new MessageEmbed() - .setDescription('**You don\'t have permissions to kick members!**') - return message.channel.send({ embeds: [kickError] }) //return this embed - - } else if(!message.guild.me.permissions.has('KICK_MEMBER')) { //if bot don't have kick member permission then - const kickError1 = new MessageEmbed() - .setDescription('**I don\'t have permissions to kick members!**') - return message.channel.send({ embeds: [kickError1] }) //return this embed - } - - const mentionedPosition = mentionedMember.roles.highest.position //the highest role of the mentioned member - const memberPosition = message.member.roles.highest.position //highest role of you - const botPosition = message.guild.me.roles.highest.position //highest role of the bot - - if(memberPosition <= mentionedPosition) { //if your role is lower or equals to the mentioned member u wanna kick - const kickErr = new MessageEmbed() - .setDescription('**You cannot kick this member because their role is higher/equal to yours!**') - return message.channel.send({ embeds: [kickErr] }) //return this embed - } else if (botPosition <= mentionedPosition) { //if bot role is lower or equals to the mentioned member u wanna kick - const kickErr1 = new MessageEmbed() - .setDescription('**I cannot kick this member because their role is higher/equal to mine!**') - message.channel.send({ embeds: [kickErr1] }) //return this embed - } - - try{ - const reasonDm = new MessageEmbed() //DM the kicked user, tell him/her the reason of being kicked - .setTitle(`You were kicked by ${message.author.tag}!`) - .setDescription(`Reason: ${reason}`) - await mentionedMember.send({ embeds: [reasonDm] }) //send the embed to DM - await mentionedMember.kick().then(() => { //then kick the user - - const kickSuccess = new MessageEmbed() - .setTitle(`${mentionedMember.user.tag} was kicked\nby ${message.author.tag}`) - .setDescription(`Reason: ${reason}`) - message.channel.send({ embeds: [kickSuccess] }) //send a message in channel that you kicked that user - }) - - - } catch (error) { - const errorEmbed = new MessageEmbed() - .setDescription(':x: **There was an error while kicking this user!**') - return message.channel.send({ embeds: [errorEmbed] }) //send an embed when it caught error - } - } -} \ No newline at end of file diff --git a/Slash Command Handler/commands/moderation/unban.js b/Slash Command Handler/commands/moderation/unban.js deleted file mode 100644 index 78ddeeb..0000000 --- a/Slash Command Handler/commands/moderation/unban.js +++ /dev/null @@ -1,31 +0,0 @@ -const { MessageEmbed } = require('discord.js'); - -module.exports = { - name: 'unban', - description: 'Unan a user from the server. ', - run: async(client, message, args) => { - if(!args[0]) return message.reply('**Please specify a banned user ID!**') - - if(!message.member.permissions.has('BAN_MEMBERS')) { //if you (user) don't have ban member permission then - const unbanError = new MessageEmbed() - .setDescription('**You don\'t have permissions to unban members!**') - return message.channel.send({ embeds: [unbanError] }) //return this embed - - } else if(!message.guild.me.permissions.has('BAN_MEMBERS')) { //if bot don't have ban member permission then - const unbanError1 = new MessageEmbed() - .setDescription('**I don\'t have permissions to unban members!**') - return message.channel.send({ embeds: [unbanError1] }) //return this embed - } - - try{ - let user = await message.guild.members.unban(args[0]) //unban the user. Finding the user by the User ID you given in argument 0 - let unbanSuccess = new MessageEmbed() - .setTitle(`${user.tag} was unbanned\nby ${message.author.tag}`) - return message.channel.send({ embeds: [unbanSuccess] }) - } catch { - let errorEmbed = new MessageEmbed() - .setDescription(":x: **I couldn't unban the user or the user is not banned**") - return message.channel.send({embeds: [errorEmbed]}) - } - } -}; \ No newline at end of file diff --git a/Slash Command Handler/commands/utility/avatar.js b/Slash Command Handler/commands/utility/avatar.js deleted file mode 100644 index a1bfc1c..0000000 --- a/Slash Command Handler/commands/utility/avatar.js +++ /dev/null @@ -1,21 +0,0 @@ -const { MessageEmbed } = require('discord.js'); - -module.exports = { - name: 'avatar', - description: "Displays user's avatar", - aliases: ['av'], - run: async(client, message, args) => { - let user = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author; - - let embed = new MessageEmbed() - .setTitle(`${user.username}'s Avatar`) - - .addField('PNG', `[Link](${user.displayAvatarURL({ size: 4096, dynamic: true, format: "png" })})`, true) - .addField('JPG', `[Link](${user.displayAvatarURL({ size: 4096, dynamic: true, format: "jpg" })})`, true) - .addField('WEBP', `[Link](${user.displayAvatarURL({ size: 4096, dynamic: true, format: "webp" })})`, true) - - .setImage(user.displayAvatarURL({ size: 4096, dynamic: true })) - .setTimestamp() - message.channel.send({ embeds: [embed] }) - } -} \ No newline at end of file diff --git a/Slash Command Handler/commands/utility/membercount.js b/Slash Command Handler/commands/utility/membercount.js deleted file mode 100644 index adf0549..0000000 --- a/Slash Command Handler/commands/utility/membercount.js +++ /dev/null @@ -1,14 +0,0 @@ -const { MessageEmbed } = require('discord.js'); - -module.exports = { - name: 'membercount', //name of your command - description: 'Count the number of members & bot in this server.', //description of your command - run: async(client, message, args) => { - let embed = new MessageEmbed() - .setTitle(`Total Members`) - .setDescription(`š„ ${message.guild.memberCount}\n\n**Human**\nš¤ ${message.guild.members.cache.filter(member => !member.user.bot).size}\n\n**Bot**\nš¤ ${message.guild.members.cache.filter(member => member.user.bot).size}`) - .setThumbnail(message.guild.iconURL({ size: 4096, dynamic: true })) - .setTimestamp() - message.channel.send({ embeds: [embed] }) - } -} \ No newline at end of file diff --git a/Slash Command Handler/commands/utility/say.js b/Slash Command Handler/commands/utility/say.js deleted file mode 100644 index efa1c62..0000000 --- a/Slash Command Handler/commands/utility/say.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - name: 'say', - description: 'Say a message with the bot.', - run: async(client, message, args) => { - let msg; - let textchannel = message.mentions.channels.first() //find the channel you mention in the cmd - message.delete() - if(!message.member.permissions.has('MANAGE_MESSAGES')) { //need manager messages permission to prevent people use this cmd wrong - return message.reply('**You do not have permission to use this command.**') //like sending the msg to announcement channel... - } else if(!args[0]) { // if you did not type what you wanna say, then the bot will return a message to you - return message.reply('**Please specify what you want to say!**') - }else if(textchannel) { //if you mention the channel you want to send the message - msg = args.slice(1).join(' '); // for example: !say #general hello - textchannel.send(msg) //then it will send that message to the channel you mention - }else{ - msg = args.join(' '); //this code is for getting the message you want to send - message.channel.send(msg)//then send to your message channel - } - } -} \ No newline at end of file diff --git a/Slash Command Handler/commands/utility/snipe.js b/Slash Command Handler/commands/utility/snipe.js deleted file mode 100644 index d0f592e..0000000 --- a/Slash Command Handler/commands/utility/snipe.js +++ /dev/null @@ -1,17 +0,0 @@ -const { MessageEmbed } = require('discord.js'); - -module.exports = { - name: 'snipe', //name of the command - description: 'Snipe the latest deleted message.', - run: async(client, message, args) => { - const msg = client.snipes.get(message.channel.id) //find the deleted message in message channel - if(!msg) return message.channel.send("Didn't find any deleted messages.") //if there is no deleted message, return this msg - - const embed = new MessageEmbed() - .setDescription(`**Snipe in <#${message.channel.id}>**\n\n` + 'Message: by: ' + `<@${msg.author}>` + '\nContent: \n' + msg.content) - .setTimestamp() - - if(msg.image) embed.setImage(msg.image) //if the deleted message has image, then set the image in the embed to it - message.channel.send({ embeds: [embed] }) - } -} \ No newline at end of file diff --git a/Slash Command Handler/config.json b/Slash Command Handler/config.json deleted file mode 100644 index df2a7db..0000000 --- a/Slash Command Handler/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "prefix": "your_prefix_here" -} diff --git a/Slash Command Handler/events/interactionCreate.js b/Slash Command Handler/events/interactionCreate.js deleted file mode 100644 index d63767f..0000000 --- a/Slash Command Handler/events/interactionCreate.js +++ /dev/null @@ -1,13 +0,0 @@ -const client = require('..'); - -client.on('interactionCreate', async interaction => { - if (!interaction.isCommand()) return; //if it is not interaction command then return - const slashCommand = client.slashCommands.get(interaction.commandName); //get the command name from collection - if(!slashCommand) return //if no slash cmd name then return - try{ - await slashCommand.execute(client, interaction) //execute the command - } catch (err) { - if (err) console.error(err); - await interaction.reply({ content: 'There was an error!', ephemeral: true }) - } -}); \ No newline at end of file diff --git a/Slash Command Handler/events/messageCreate.js b/Slash Command Handler/events/messageCreate.js deleted file mode 100644 index 2b0009a..0000000 --- a/Slash Command Handler/events/messageCreate.js +++ /dev/null @@ -1,20 +0,0 @@ -const { MessageEmbed, Collection } = require('discord.js'); -const client = require('..'); -const config = require('../config.json'); -const prefix = config.prefix; - -//messagCreate events -client.on("messageCreate", async (message) => { - if(message.author.bot) return; //return when message author is a bot - if(!message.content.startsWith(prefix)) return; //only response when command is start with prefix - if(!message.guild) return; //return if the command is not using in guild. For example: DM will return the cmd - if(!message.member) message.member = await message.guild.fetchMember(message); - const args = message.content.slice(prefix.length).trim().split(/ +/g); // arg[0] is the first word after the cmd (not include prefix) - //for example: !ban @user, so @user is args[0] If you still don't understand, feel free to ask me in Discord. - const cmd = args.shift().toLowerCase(); - if(cmd.length == 0 ) return; - let command = client.commands.get(cmd) - if(!command) command = client.commands.get(client.aliases.get(cmd)); - if(command) command.run(client, message, args) - -}); \ No newline at end of file diff --git a/Slash Command Handler/handler/command.js b/Slash Command Handler/handler/command.js deleted file mode 100644 index 1b0162d..0000000 --- a/Slash Command Handler/handler/command.js +++ /dev/null @@ -1,35 +0,0 @@ -const { readdirSync } = require('fs'); -const ascii = require('ascii-table'); -const client = require('..'); -let table = new ascii("Commands"); -table.setHeading('Commands', 'Load'); - -module.exports = (client) => { - readdirSync('./commands/').forEach(dir => { - const commands = readdirSync(`./commands/${dir}/`).filter(file => file.endsWith('.js')); - for(let file of commands) { - let pull = require(`../commands/${dir}/${file}`); - if(pull.name) { - client.commands.set(pull.name, pull); - table.addRow(file, 'OK') - }else { - table.addRow(file, 'Error - Missing a help.name or it is not a string...') - continue; - }if(pull.aliases && Array.isArray(pull.aliases)) pull.aliases.forEach(alias => client.aliases.set(alias, pull.name)) - } - }); - console.log(table.toString()); - - readdirSync('./events/').forEach((file) => { - const events = readdirSync('./events/').filter((file) => - file.endsWith('.js') - ); - for (let file of events) { - let pull = require(`../events/${file}`); - if(pull.name) { - client.events.set(pull.name, pull); - } - } - console.log(`${file} Events load`) - }) -} \ No newline at end of file diff --git a/Slash Command Handler/handler/slashCommand.js b/Slash Command Handler/handler/slashCommand.js deleted file mode 100644 index fd8fbc8..0000000 --- a/Slash Command Handler/handler/slashCommand.js +++ /dev/null @@ -1,49 +0,0 @@ -const fs = require('fs') -const { REST } = require('@discordjs/rest') -const { Routes } = require('discord-api-types/v9') - -const token = process.env['token']; //get the token in .env -const guild = process.env['guild']; //get the guild ID in .env -const application_id = process.env['application_id']; //get the application ID in .env - -module.exports = (client) => { - - const slashCommands = []; //make a variable - - fs.readdirSync('./slashCommands/').forEach(dir => { - const slashCommandFiles = fs.readdirSync(`./slashCommands/${dir}/`).filter(file => file.endsWith('.js')); - - for (const file of slashCommandFiles) { - const slashCommand =require(`../slashCommands/${dir}/${file}`); - slashCommands.push(slashCommand.data.toJSON()); - if(slashCommand.data.name) { //if the slash command file has a name - client.slashCommands.set(slashCommand.data.name, slashCommand) - console.log(file, '- Success') //check if the file load and log in console - } else { - console.log(file, '- Error') //if the file doesn't have command name, log it error in console - } - } - }); - - const rest = new REST({ version: '9' }).setToken(token); - - (async () => { - try{ - console.log('Start registering application slash commands...') - - await rest.put( - guild - ? Routes.applicationGuildCommands(application_id, guild) //registered the slash command in guild - : Routes.applicationGuildCommands(application_id), //registered the slash command globally - { - body: slashCommands, - } - ); - - console.log('Successfully registered application slash commands.') - } catch (err) { - console.log(err); - } - })(); - -}; \ No newline at end of file diff --git a/Slash Command Handler/index.js b/Slash Command Handler/index.js deleted file mode 100644 index 73a272c..0000000 --- a/Slash Command Handler/index.js +++ /dev/null @@ -1,70 +0,0 @@ -const { Client, Message, MessageEmbed, Collection } = require('discord.js') -const fs = require('fs') -const client = new Client({ - partials: ["MESSAGE", "CHANNEL", "REACTION"], - intents: 32767, -}); - -module.exports = client; - -const dotenv = require('dotenv') -const envFile = dotenv.config() -const config = require('./config.json') -const prefix = config.prefix -const token = process.env['token'] - - -client.on("ready", () => { - console.log(`${client.user.tag} is ready!`) - - const actvs = [ - `${prefix}help | Under Development`, - `${prefix}help | ${client.channels.cache.size} channels`, - `${prefix}help | ${client.users.cache.size} users`, - `${prefix}help | ${client.guilds.cache.size} servers`, - ] - - client.user.setActivity(actvs[Math.floor(Math.random() * (actvs.length - 1) + 1)], { type: 'COMPETING' }); - setInterval(() => { - client.user.setActivity(actvs[Math.floor(Math.random() * (actvs.length - 1) + 1)], { type: 'COMPETING' }); - }, 5000); - - client.user.setStatus('idle') - - -}); - - - -//new collections -client.commands = new Collection(); -client.aliases = new Collection(); -client.events = new Collection(); - -client.categories = fs.readdirSync('./commands'); - -//load the files -['command'].forEach((handler) => { - require(`./handler/${handler}`)(client) -}); - -//slash commands -client.slashCommands = new Collection(); - -['slashCommand'].forEach((handler) => { - require(`./handler/${handler}`)(client) -}); - - -//snipe map -client.snipes = new Map() //create a new map -client.on('messageDelete', function(message, channel) { - client.snipes.set(message.channel.id, { //get the channel of message - content: message.content, //snipe the message that was deleted - author: message.author.id, //get the message author the the deleted message - image: message.attachments.first() ? message.attachments.first().proxyURL : null //get the deleted image if there is one - }) -}) - -//We will move our token from config.json to .env -client.login(token) \ No newline at end of file diff --git a/Slash Command Handler/package.json b/Slash Command Handler/package.json deleted file mode 100644 index fcfeed6..0000000 --- a/Slash Command Handler/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "discord.js-v13-slash-commands", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "@discordjs/builders": "^0.11.0", - "@discordjs/rest": "^0.2.0-canary.0", - "discord-api-types": "^0.26.1", - "discord.js": "^13.2.0", - "dotenv": "^10.0.0", - "fs": "^0.0.1-security" - } -} diff --git a/Slash Command Handler/slashCommands/info/ping.js b/Slash Command Handler/slashCommands/info/ping.js deleted file mode 100644 index c9af469..0000000 --- a/Slash Command Handler/slashCommands/info/ping.js +++ /dev/null @@ -1,10 +0,0 @@ -const { SlashCommandBuilder } = require('@discordjs/builders'); - -module.exports = { - data: new SlashCommandBuilder() - .setName('ping') //name of the slash command - .setDescription('Returns bot ping.'), //description of the slash cmd - async execute(client, interaction) { - interaction.reply({ content: `Pong! **${client.ws.ping} ms**`, ephemeral: true }) - } -} \ No newline at end of file diff --git a/balance.js b/balance.js new file mode 100644 index 0000000..29a85b3 --- /dev/null +++ b/balance.js @@ -0,0 +1,56 @@ +const { SlashCommandBuilder } = require('@discordjs/builders'); +const { MessageEmbed } = require('discord.js'); +const db = require('quick.db'); //the npm we use to create/get database + +module.exports = { + data: new SlashCommandBuilder() //create a new slash cmd with slash command builder + .setName('balance') //set the name of the slash command + .setDescription('Displays the balance of a user.') //description of the slash cmd + .addUserOption((option) => { //add a slash cmd options for user to choose which balance of the user he/she wants to display + return option + .setName('user') //name of the option + .setDescription('Select a user') //description of the option + .setRequired(false) //user can choose a user or check the balance of interaction user + }), + /* you can use this also if you don't want to use {} + .addUserOption((option) => //add a slash cmd options for user to choose which balance of the user he/she wants to display + option + .setName('user') //name of the option + .setDescription('Select a user') //description of the option + .setRequired(false) //user can choose a user or check the balance of interaction user + ), + */ + async execute(client, interaction) { + let user = interaction.options.getUser('user') //get the user from the options of slash cmd + + //user getted in options and get the wallet * bank db of them + let wallet = db.get(`wallet_${user.id}`) //get the wallet db of a user + let bank = db.get(`bank_${user.id}`) //get the bank db of a user + + //user did not select any user, so they get the interaction user's wallet/bank db + let authorWallet = db.get(`wallet_${interaction.user.id}`) + let authorBank = db.get(`bank_${interaction.user.id}`) + + if(wallet == null) wallet = 0; //if the wallet db is null, it will show 0 in the wallet variable + if(bank == null) bank = 0; //if bank db is null, it will show 0 in the bank variable + + if(authorWallet == null) authorWallet = 0; //set the authorWallet var to 0 + if(authorBank == null) authorBank = 0; //set the authorBank var to 0 + + if(!user) { //if the user didn't select any user in option + let authorEmbed = new MessageEmbed() //create a new embed message + .setTitle(`${interaction.user.username}'s Balance`) + .setDescription(`**Wallet:** ${authorWallet}\n**Bank:** ${authorBank}`) + .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) + .setTimestamp() + interaction.reply({ embeds: [authorEmbed] }) + } else { //the user that selected user in option + let userEmbed = new MessageEmbed() //create a new embed message + .setTitle(`${user.username}'s Balance`) + .setDescription(`**Wallet:** ${wallet}\n**Bank:** ${bank}`) + .setThumbnail(user.displayAvatarURL({ dynamic: true })) + .setTimestamp() + interaction.reply({ embeds: [userEmbed] }) + } + } +};