Skip to content

Commit

Permalink
feat: exit early with mode=test argv
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirasaki committed Mar 6, 2023
1 parent e5bffd1 commit 4d88140
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,5 +248,9 @@ logger.success(`Finished initializing after ${ getRuntime(initTimerStart).ms } m
// Require our server index file if requested
if (USE_API === 'true') require('./server/');

// Exit before initializing listeners in test mode
const firstArg = process.argv[2];
if (firstArg.startsWith('mode=') && firstArg.endsWith('test')) process.exit(1);

// Logging in to our client
client.login(DISCORD_BOT_TOKEN);

0 comments on commit 4d88140

Please sign in to comment.