Skip to content

Commit

Permalink
Merge pull request #15 from Mirasaki/dev
Browse files Browse the repository at this point in the history
check missing test command data
  • Loading branch information
Mirasaki authored May 16, 2022
2 parents a31d15e + f402f4b commit db630b0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/handlers/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ const registerGlobalCommands = async (client) => {

// Registering our Test Server commands
const registerTestServerCommands = (client) => {
// Logging
logger.info('Registering Test Server Commands');

// Defining our variables
const { commands } = client.container;
const testServerCommandData = commands
Expand All @@ -202,6 +199,14 @@ const registerTestServerCommands = (client) => {
)
.map((cmd) => cmd.data);

// Return if there's no test command data
if (testServerCommandData.length === 0) {
return true;
}

// Logging
logger.info('Registering Test Server Commands');

// Extensive debug logging
if (DEBUG_SLASH_COMMAND_API_DATA === 'true') {
logger.startLog('Test Server Command Data');
Expand Down

0 comments on commit db630b0

Please sign in to comment.