mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
change typeof variable === 'undefined'
to !variable
This commit is contained in:
parent
9e4dc24b4a
commit
9e0ed07160
1 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,7 @@ module.exports = {
|
|||
usage: '[command]',
|
||||
trusted: 0,
|
||||
execute: function(bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {
|
||||
if (typeof args[0] !== 'undefined') {
|
||||
if (args[0]) {
|
||||
for (const command of bot.command_handler.commands) {
|
||||
function run() {
|
||||
let alias = command.name;
|
||||
|
@ -98,7 +98,7 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
discordExecute: async function(bot, username, usernameraw, sender, prefix, args, channeldc) {
|
||||
if (typeof args[0] !== 'undefined') {
|
||||
if (args[0]) {
|
||||
for (const command of bot.command_handler.commands) {
|
||||
function run() {
|
||||
let alias = command.name;
|
||||
|
@ -125,11 +125,11 @@ module.exports = {
|
|||
let supportedCommands = '';
|
||||
let unsupportedCommands = '';
|
||||
for (const command of bot.command_handler.commands) {
|
||||
if (typeof command.discordExecute === 'undefined') continue;
|
||||
if (!command.discordExecute) continue;
|
||||
supportedCommands += command.name + ' ';
|
||||
}
|
||||
for (const command of bot.command_handler.commands) {
|
||||
if (typeof command.discordExecute !== 'undefined') continue;
|
||||
if (!command.discordExecute) continue;
|
||||
unsupportedCommands += command.name + ' ';
|
||||
}
|
||||
const Embed = new MessageEmbed()
|
||||
|
|
Loading…
Reference in a new issue