Added a login embed
This commit is contained in:
@@ -78,11 +78,12 @@ module.exports = {
|
|||||||
if (subcommand === 'reload') {
|
if (subcommand === 'reload') {
|
||||||
|
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
|
await interaction.reply({ content: 'Reloading...', ephemeral: true })
|
||||||
|
|
||||||
exec('pm2 restart 0', async (err, stdout, stderr) => {
|
exec('pm2 restart 0', async (err, stdout, stderr) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
await interaction.reply({ content: 'Error while reloading: ' + err, ephemeral: true })
|
await interaction.reply({ content: 'Error while reloading: ' + err, ephemeral: true })
|
||||||
}
|
}
|
||||||
await interaction.reply({ content: 'Reloading...', ephemeral: true })
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,5 +4,6 @@
|
|||||||
"staffApplicationsChannel": "1039258641393520700",
|
"staffApplicationsChannel": "1039258641393520700",
|
||||||
"inactivityLogChannel": "829742524796239882",
|
"inactivityLogChannel": "829742524796239882",
|
||||||
"staffOtherChannel": "1082036748558803104",
|
"staffOtherChannel": "1082036748558803104",
|
||||||
"hypixelGuildID": "5a353a170cf2e529044f2935"
|
"hypixelGuildID": "5a353a170cf2e529044f2935",
|
||||||
|
"botLogChannel": "1101144489306886226"
|
||||||
}
|
}
|
||||||
14
index.js
14
index.js
@@ -1,4 +1,5 @@
|
|||||||
const { Client, GatewayIntentBits, Partials, ActivityType, Events, Collection } = require('discord.js');
|
const { Client, GatewayIntentBits, Partials, ActivityType, Events, Collection } = require('discord.js');
|
||||||
|
const { botLogChannel, color } = require('./config/options.json');
|
||||||
const env = require('dotenv').config();
|
const env = require('dotenv').config();
|
||||||
const token = process.env.TOKEN;
|
const token = process.env.TOKEN;
|
||||||
const mongoURI = process.env.MONGOURI;
|
const mongoURI = process.env.MONGOURI;
|
||||||
@@ -165,6 +166,19 @@ for (const file of modalFiles) {
|
|||||||
}
|
}
|
||||||
client.on(Events.ClientReady, () => {
|
client.on(Events.ClientReady, () => {
|
||||||
console.log("Logged in as " + client.user.tag + "!");
|
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
|
||||||
|
}]
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on(Events.ClientReady, () => {
|
client.on(Events.ClientReady, () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user