mirror of
https://github.com/DarthKilroy/Spot.git
synced 2025-12-19 18:26:48 +00:00
Initial commit
This commit is contained in:
commit
8ae81f1cc6
24 changed files with 1425 additions and 0 deletions
12
event/bot/message.js
Normal file
12
event/bot/message.js
Normal 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
19
event/bot/ready.js
Normal 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 :) !`);
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue