rename slashCommandOptions to options, and permission to permissions

This commit is contained in:
Noah committed 2021-12-18 18:57:26 -06:00
1 parent bc649caa99
commit 4e554b8bee
10 files changed
+21 -27

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ const Command = require("../Structures/Command.js");
module.exports = new Command({
name: cmdconfig.TicketAdd,
description: cmdconfig.TicketAddDesc,
slashCommandOptions: [
options: [
{
name: "user",
description: "User to add",
@@ -23,7 +23,7 @@ module.exports = new Command({
required: true,
},
],
permission: "SEND_MESSAGES",
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
+2 -2
View File
@@ -15,14 +15,14 @@ const Command = require("../Structures/Command.js");
module.exports = new Command({
name: cmdconfig.CloseTicket,
description: cmdconfig.CloseTicketDesc,
slashCommandOptions: [
options: [
{
name: "reason",
description: "Ticket Close Reason",
type: "STRING",
},
],
permission: "SEND_MESSAGES",
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
+2 -2
View File
@@ -15,7 +15,7 @@ const Command = require("../Structures/Command.js");
module.exports = new Command({
name: cmdconfig.EmbedCommand,
description: cmdconfig.EmbedCommandDesc,
slashCommandOptions: [
options: [
{
name: "title",
description: "Embed Title",
@@ -28,7 +28,7 @@ module.exports = new Command({
type: "STRING",
},
],
permission: "SEND_MESSAGES",
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
+2 -2
View File
@@ -21,8 +21,8 @@ async function asyncForEach(array, callback) {
module.exports = new Command({
name: cmdconfig.HelpCommand,
description: cmdconfig.HelpCommandDesc,
slashCommandOptions: [],
permission: "SEND_MESSAGES",
options: [],
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
+2 -2
View File
@@ -15,8 +15,8 @@ const Command = require("../Structures/Command.js");
module.exports = new Command({
name: cmdconfig.InfoCommand,
description: cmdconfig.InfoCommandDesc,
slashCommandOptions: [],
permission: "SEND_MESSAGES",
options: [],
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const InfoButton = new Discord.MessageButton()
+2 -2
View File
@@ -15,8 +15,8 @@ const Command = require("../Structures/Command.js");
module.exports = new Command({
name: cmdconfig.PingCommand,
description: cmdconfig.PingCommandDesc,
slashCommandOptions: [],
permission: "SEND_MESSAGES",
options: [],
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const PingEmbed = new Discord.MessageEmbed()
+2 -2
View File
@@ -21,7 +21,7 @@ async function asyncForEach(array, callback) {
module.exports = new Command({
name: cmdconfig.TicketRemove,
description: cmdconfig.TicketRemoveDesc,
slashCommandOptions: [
options: [
{
name: "user",
description: "User to remove",
@@ -29,7 +29,7 @@ module.exports = new Command({
required: true,
},
],
permission: "SEND_MESSAGES",
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
+2 -2
View File
@@ -15,14 +15,14 @@ const Command = require("../Structures/Command.js");
module.exports = new Command({
name: cmdconfig.SuggestCommand,
description: cmdconfig.SuggestCommandDesc,
slashCommandOptions: [
options: [
{
name: "suggestion",
description: "Create a Suggestion",
type: "STRING",
},
],
permission: "SEND_MESSAGES",
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
+2 -2
View File
@@ -21,14 +21,14 @@ const TicketNumberID = require("../Structures/TicketID.js");
module.exports = new Command({
name: cmdconfig.OpenTicket,
description: cmdconfig.OpenTicketDesc,
slashCommandOptions: [
options: [
{
name: "reason",
description: "Ticket Reason",
type: "STRING",
},
],
permission: "SEND_MESSAGES",
permissions: ["SEND_MESSAGES"],
async run(interaction) {
const { getRole, getChannel, getCategory } = interaction.client;
+3 -9
View File
@@ -3,22 +3,16 @@
const fs = require("fs");
const Discord = require("discord.js");
const yaml = require("js-yaml");
const supportbot = yaml.load(
fs.readFileSync("./Configs/supportbot.yml", "utf8")
);
function RunFunction(interaction) {}
class Command {
constructor(options) {
this.name = options.name;
this.description = options.description;
this.permission = options.permission;
this.slashCommandOptions = options.slashCommandOptions || [];
this.permissions = options.permissions;
this.options = options.options || [];
this.run = options.run;
this.defaultPermission = true;
}
}