mirror of
https://github.com/DarthKilroy/Spot.git
synced 2026-02-09 12:37:51 +00:00
de-OOPify stuff a little
This commit is contained in:
parent
c3fa0554c4
commit
2aadc1a1ef
6 changed files with 30 additions and 89 deletions
|
|
@ -81,21 +81,12 @@ const categoryPage = (cat, id, direct = false) => {
|
|||
return data;
|
||||
}
|
||||
|
||||
class Help
|
||||
{
|
||||
constructor() {
|
||||
this.aliases = ['commands'];
|
||||
this.category = CommandCategory.INFO;
|
||||
this.isAllowedForContext = CommandPermission.yes;
|
||||
this.description = 'Provides the list of commands';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Message} message
|
||||
* @param {Array} args
|
||||
* @param {Command} Command
|
||||
*/
|
||||
async process(message, args, command) {
|
||||
module.exports = {
|
||||
aliases: ["commands"],
|
||||
category: CommandCategory.INFO,
|
||||
isAllowedForContext: () => true,
|
||||
description: 'Provides the list of commands.',
|
||||
process: async (message, args) => {
|
||||
if (!args[0])
|
||||
await bot.api.channels(message.channel.id).messages.post({ data: mainPage(message.author.id) });
|
||||
else
|
||||
|
|
@ -111,8 +102,6 @@ class Help
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new Help();
|
||||
|
||||
module.exports.interactionHandler = async (event) => {
|
||||
const user = event.member ? event.member.user.id : event.user.id;
|
||||
const customId = event.data.custom_id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue