Files
illegitimate-bot/events/server/ready/sendOnlineMessage.js

28 lines
711 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
}]
})
}
}