Initial commit

This commit is contained in:
Lily Wonhalf 2021-05-02 20:00:36 -04:00
commit 8ae81f1cc6
24 changed files with 1425 additions and 0 deletions

12
event/bot/message.js Normal file
View file

@ -0,0 +1,12 @@
const Command = require('../../model/command');
/**
* @param {Message} message
*/
module.exports = async (message) => {
const user = message.author;
if (!user.bot) {
await Command.parseMessage(message);
}
};

19
event/bot/ready.js Normal file
View file

@ -0,0 +1,19 @@
const Logger = require('@lilywonhalf/pretty-logger');
const Config = require('../../config.json');
const Guild = require('../../model/guild');
module.exports = async () => {
Logger.info('Logged in as ' + bot.user.username + '#' + bot.user.discriminator);
Logger.info('--------');
Logger.info('Syncing guilds...');
await Guild.init();
Logger.info('Guilds synced. Serving in ' + Guild.discordGuild.name);
Logger.info('--------');
if (process.argv[3] === '--reboot') {
bot.users.cache.get(Config.mom).send(`I'm back :) !`);
}
};