Moved event handlers to seperate files

This commit is contained in:
2023-11-18 18:42:32 +01:00
parent 4621abe01c
commit 1befe97f90
11 changed files with 316 additions and 213 deletions

View File

@@ -0,0 +1,27 @@
const { Events } = require('discord.js');
const { botLogChannel, color } = require('../../config/options.json');
module.exports = {
name: 'sendonlinemessage',
description: "send an online message",
type: 'ready',
execute(client) {
if (process.env.NODE_ENV !== 'dev') {
console.log("Logged in as " + client.user.tag + "!");
const channel = client.channels.cache.get(botLogChannel);
const embedColor = Number(color.replace('#', '0x'))
if (!channel) {
return;
}
channel.send({
embeds: [{
description: `Bot is online!`,
color: embedColor
}]
});
}
}
}