Skip to content

Commit

Permalink
fix: types check for legacy commands
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Nov 30, 2021
1 parent 8dc3cb3 commit 2c97848
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/commands/Core/Help.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,7 @@ const commandSort = (a, b) => {
return 0;
};

/**
* Describes the Help command
*/
class Help extends Command {
/**
* Constructs a callable command
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'core.help', 'help', 'Display this message', 'CORE');

Expand Down
4 changes: 2 additions & 2 deletions src/eventHandlers/CommandHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Discord = require('discord.js');
const Handler = require('../models/BaseEventHandler');
const { games, emojify } = require('../CommonFunctions');

const { Permissions, Constants: { Events, ChannelTypes: Types } } = Discord;
const { Permissions, Constants: { Events } } = Discord;

/**
* Checks if the command is callable,
Expand Down Expand Up @@ -205,7 +205,7 @@ class CommandHandler extends Handler {
this.logger.debug(`${command.id} is owner-only`);
return false;
}
if ([Types.DM, Types.GROUP_DM, Types.GUILD_TEXT, Types.GUILD_PUBLIC_THREAD]
if (['DM', 'GROUP_DM', 'GUILD_TEXT', 'GUILD_PUBLIC_THREAD']
.includes(message.channel.type)) {
if (command.requiresAuth) {
if (hasAuth(message)) {
Expand Down

0 comments on commit 2c97848

Please sign in to comment.