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