feat: online message

This commit is contained in:
TresAbhi committed 2023-04-28 13:47:32 +00:00
1 parent 8ff34f0bbb
commit a3b2a34d7f
1 file changed
+16 -1
+16 -1
View File
@@ -1,7 +1,22 @@
import { Client } from 'discord.js';
import { Client, EmbedBuilder, TextChannel } from 'discord.js';
import discord from '../../discord.json' assert { type: 'json' };
import { POSITIVE_COLOR } from '../constants/colors.js';
import isDev from '../utilities/isDev.js';
export default function ready(client: Client<true>) {
(
client.guilds.cache
.get(discord.guild_id)
?.channels.cache.get(discord.log_channel) as TextChannel
).send({
embeds: [
new EmbedBuilder()
.setTitle(`${client.user.username} came online`)
.setDescription('All systems operating properly')
.setColor(POSITIVE_COLOR),
],
});
console.log(
`Logged in as ${client.user.tag} in ${
isDev() ? 'development' : 'production'