Cuu.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
394 B

  1. import CLIENT from './client';
  2. import './handlers';
  3. if (!process.env.DISCORD_BOT_TOKEN) {
  4. console.error('No bot token specified.');
  5. process.exit(1);
  6. }
  7. CLIENT.login(process.env.DISCORD_BOT_TOKEN)
  8. .then(() => {
  9. if (CLIENT.user) {
  10. console.log(`Bot client logged in as ${CLIENT.user.tag}`);
  11. }
  12. })
  13. .catch((err: Error) => {
  14. console.error(err);
  15. process.exit(1);
  16. });