toowake

xp.js

Sep 17th, 2023
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits, AttachmentBuilder, ChannelType } = require("discord.js");
  2. const DISABLED = require("../../Schemas.js/Panel/Systems/xp");
  3. const channelSchema = require("../../Schemas.js/Leveling/xpChannel");
  4. const roleSchema = require("../../Schemas.js/Leveling/xp-roles");
  5. const amountSchema = require("../../Schemas.js/Leveling/xp-message");
  6.  
  7. module.exports = {
  8.     data: new SlashCommandBuilder()
  9.     .setName("xp")
  10.     .setDescription("Modify the XP System")
  11.     .addSubcommandGroup(group => group
  12.         .setName("channel")
  13.         .setDescription("Modify the XP Channel")
  14.         .addSubcommand(command => command
  15.             .setName("add")
  16.             .setDescription("Add a XP Channel for the Leveling Message")
  17.             .addChannelOption(option => option
  18.                 .setName("channel")
  19.                 .setDescription("The channel for the leveling message")
  20.                 .setRequired(true)
  21.                 .addChannelTypes(
  22.                     ChannelType.GuildAnnouncement,
  23.                     ChannelType.GuildText,
  24.                     ChannelType.GuildForum,
  25.                     ChannelType.PublicThread,
  26.                     ChannelType.PrivateThread
  27.                 )
  28.             )
  29.         )
  30.         .addSubcommand(command => command
  31.             .setName("remove")
  32.             .setDescription("Remove an XP Channel")
  33.         )
  34.     )
  35.     .addSubcommand(command => command
  36.         .setName("amount")
  37.         .setDescription("Modify the amount of the XP per message")
  38.         .addIntegerOption(option => option
  39.             .setName("amount")
  40.             .setDescription("The amount of XP per message you want")
  41.             .setRequired(true)
  42.             .setMinValue(1)
  43.         )
  44.     )
  45.     .addSubcommandGroup(group => group
  46.         .setName("reset")
  47.         .setDescription("Reset the XP of a member/guild")
  48.         .addSubcommand(command => command
  49.             .setName("server")
  50.             .setDescription("Reset the servers xp")
  51.         )
  52.         .addSubcommand(command => command
  53.             .setName("member")
  54.             .setDescription("Reset a members XP")
  55.             .addUserOption(option => option
  56.                 .setName("target")
  57.                 .setDescription("The target you want to reset the XP")
  58.                 .setRequired(true)
  59.             )
  60.         )
  61.     )
  62.     .addSubcommand(command => command
  63.         .setName("role-add")
  64.         .setDescription("Add a XP role")
  65.         .addRoleOption(option => option
  66.             .setName("role")
  67.             .setDescription("The role")
  68.             .setRequired(true)
  69.         )
  70.         .addIntegerOption(option => option
  71.             .setName("level")
  72.             .setDescription("The Level")
  73.             .setRequired(true)
  74.         )
  75.     )
  76.     .addSubcommand(command => command
  77.         .setName("role-edit")
  78.         .setDescription("edit a level reward")
  79.         .addIntegerOption(option => option.setName("level").setDescription("The level you want to edit").setRequired(true).setMinValue(1).setMaxValue(100))
  80.         .addRoleOption(option => option.setName("role").setDescription("The new role you want to add").setRequired(true))
  81.     )
  82.     .addSubcommandGroup(group => group
  83.         .setName("role-remove")
  84.         .setDescription("Remove a reward by level or role")
  85.         .addSubcommand(command => command
  86.             .setName("by-role")
  87.             .setDescription("remove a level reward by the role")
  88.             .addRoleOption(option => option.setName("role").setDescription("The role you want to remove").setRequired(true))
  89.         )
  90.         .addSubcommand(command => command
  91.             .setName("by-level")
  92.             .setDescription("remove a level reward by the level")
  93.             .addIntegerOption(option => option.setName("level").setDescription("The level you want ro remove the reward").setRequired(true).setMinValue(1).setMaxValue(100))
  94.         )
  95.     ),
  96.  
  97.     async execute (interaction, client) {
  98.        
  99.     }
  100. }
Advertisement
Add Comment
Please, Sign In to add comment