Guest User

Slash Command Builder Code

a guest
Jan 19th, 2022
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const { Client, CommandInteraction } = require("discord.js");
  2. const { SlashCommandBuilder } = require("@discordjs/builders");
  3.  
  4. module.exports = {
  5.    ...new SlashCommandBuilder()
  6.   .setName('info')
  7.   .setDescription(
  8.     'Displays information regarding the current server or specified user',
  9.   )
  10.   .addSubcommand((subcommand) =>
  11.     subcommand
  12.       .setName('user')
  13.       .setDescription('Displays information regarding the specified user')
  14.       .addUserOption((option) =>
  15.         option.setName('target')
  16.           .setDescription('The user')
  17.           .setRequired(true),
  18.       ),
  19.   )
  20.   .addSubcommand((subcommand) =>
  21.     subcommand
  22.       .setName('member')
  23.       .setDescription('Displays information regarding the specified guild member')
  24.       .addUserOption((option) =>
  25.         option
  26.           .setName('target')
  27.           .setDescription('The member')
  28.           .setRequired(true),
  29.       ),
  30.   )
  31.   .addSubcommand((subcommand) =>
  32.     subcommand
  33.       .setName('server')
  34.       .setDescription('Displays information regarding the current server'),
  35.   ),
  36.  
  37.     /**
  38.      *
  39.      * @param {Client} bot
  40.      * @param {CommandInteraction} interaction
  41.      * @param {String[]} args
  42.      */
  43.  
  44.     run: async (bot, interaction, args) => {
  45.    
  46.     },
  47. };
  48.  
Advertisement
Add Comment
Please, Sign In to add comment