aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2021-12-13 20:28:04 -0500
committerMax Isom <[email protected]>2021-12-13 20:28:04 -0500
commitcf7f6c7e8fcfa33d0ea87ee5928dc88a5740c114 (patch)
treeeeea58670e3facb4cf0f1b66ea7a94dd445e0854 /src
parentd2ab10a13ab22d21f3e52106f355fc8272e11651 (diff)
parent761ac9f7ed3d446c5a3384a8c2608e82be9cdd34 (diff)
downloadmuse-cf7f6c7e8fcfa33d0ea87ee5928dc88a5740c114.tar.xz
muse-cf7f6c7e8fcfa33d0ea87ee5928dc88a5740c114.zip
Merge branch 'master' into feature/slash-commands
Diffstat (limited to 'src')
-rw-r--r--src/bot.ts8
-rw-r--r--src/index.ts13
2 files changed, 19 insertions, 2 deletions
diff --git a/src/bot.ts b/src/bot.ts
index 01616ff..f0fb442 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -1,5 +1,6 @@
import {Client, Collection, User} from 'discord.js';
import {inject, injectable} from 'inversify';
+import ora from 'ora';
import {TYPES} from './types.js';
import container from './inversify.config.js';
import Command from './commands/index.js';
@@ -71,9 +72,12 @@ export default class {
}
});
- this.client.once('ready', async () => {
+ const spinner = ora('📡 connecting to Discord...').start();
+
+ this.client.once('ready', () => {
debug(generateDependencyReport());
- console.log(`Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=${this.client.user?.id ?? ''}&scope=bot&permissions=2184236096`);
+
+ spinner.succeed(`Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=${this.client.user?.id ?? ''}&scope=bot&permissions=2184236096`);
});
this.client.on('error', console.error);
diff --git a/src/index.ts b/src/index.ts
index 383faef..a6b6d35 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,15 +1,28 @@
import makeDir from 'make-dir';
import path from 'path';
+import {makeLines} from 'nodesplash';
import container from './inversify.config.js';
import {TYPES} from './types.js';
import Bot from './bot.js';
import {sequelize} from './utils/db.js';
import Config from './services/config.js';
import FileCacheProvider from './services/file-cache.js';
+import metadata from '../package.json';
const bot = container.get<Bot>(TYPES.Bot);
(async () => {
+ // Banner
+ console.log(makeLines({
+ user: 'codetheweb',
+ repository: 'muse',
+ version: metadata.version,
+ paypalUser: 'codetheweb',
+ githubSponsor: 'codetheweb',
+ madeByPrefix: 'Made with 🎶 by ',
+ }).join('\n'));
+ console.log('\n');
+
// Create data directories if necessary
const config = container.get<Config>(TYPES.Config);