This commit is contained in:
ChomeNS 2022-08-19 07:22:45 +07:00
parent c9b743fdd0
commit a051e1917f

View file

@ -48,6 +48,7 @@ const {
Intents, Intents,
MessageEmbed, MessageEmbed,
} = require('discord.js'); } = require('discord.js');
const { channel } = require('diagnostics_channel');
// Create Discord intentions, required in v13 // Create Discord intentions, required in v13
const intents = new Intents(['GUILDS', 'GUILD_MESSAGES']); const intents = new Intents(['GUILDS', 'GUILD_MESSAGES']);
// Create Discord client // Create Discord client
@ -380,7 +381,7 @@ function main() {
function onEnd() { function onEnd() {
bot.on('end', (reason, event) => { bot.on('end', (reason, event) => {
console.log(`Disconnected (${event} event): ${util.inspect(reason)}`); console.log(`Disconnected (${event} event): ${util.inspect(reason)}`);
dcmsg.queue += '\n' + `Disconnected (${event} event): ${util.inspect(reason)}`; channel.send(`Disconnected (${event} event): ${util.inspect(reason)}`);
let timeout = 1000; let timeout = 1000;