Files
illegitimate-bot/events/server/ready/sendOnlineMessage.js
2023-11-22 14:01:06 +01:00

28 lines
716 B
JavaScript

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') return
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
}]
});
}
}