Moved all handlers into one file

This commit is contained in:
2023-11-21 13:21:40 +01:00
parent 926d1f01e8
commit 5962609e39
15 changed files with 52 additions and 133 deletions

View File

@@ -0,0 +1,27 @@
const { onlineLogChannel, color } = require('../../../config/options.json');
module.exports = {
name: 'sendonlinemessage',
description: "send an online message",
type: 'event',
event: 'ready',
execute(client) {
if (process.env.NODE_ENV !== 'dev') {
const channel = client.channels.cache.get(onlineLogChannel);
const embedColor = Number(color.replace('#', '0x'))
if (!channel) {
console.log(`[ERROR] Could not find channel used for online message.`);
return;
}
channel.send({
embeds: [{
description: `Bot is online!`,
color: embedColor
}]
});
}
}
}