-
-
Save workframes/785e9396105da6489fd212281d04f809 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { SlashCommandBuilder } = require('discord.js'); | |
const BaseSlashCommand = require('../../util/BaseSlashCommand'); | |
module.exports = class Name extends BaseSlashCommand{ | |
constructor(){ | |
super("name", true) // name in lowercase, is restricted to managers | |
} | |
async run(client, interaction){ // Basic Discord.js client, Basic Discord.js interaction | |
// DO Stuff | |
} | |
getRaw(){ | |
// Slash Commnad Building | |
// How to add more options and stuff, https://discordjs.guide/slash-commands/advanced-creation.html#adding-options | |
return new SlashCommandBuilder() | |
.setName(this.name) | |
.setDescription('Example Command') | |
.addStringOption((option) => | |
option | |
.setName('example option') | |
.setDescription('this is a example option') | |
) | |
.toJSON(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment