From ecaa8611357748e4f18ed1b8bc1df541e12df2c5 Mon Sep 17 00:00:00 2001 From: Bsian Date: Wed, 20 May 2020 12:17:47 +0100 Subject: [PATCH] Send debugs to see reason for ws disconnect --- src/main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.ts b/src/main.ts index 5213da2..15a9f77 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,6 +3,7 @@ */ import { parse } from 'yaml'; import { promises as fs } from 'fs'; +import { TextChannel } from 'eris'; import { Client } from './class'; async function main(): Promise { @@ -16,6 +17,7 @@ async function main(): Promise { await client.loadEvents(); await client.loadCommands(); client.connect(); + client.once('ready', () => client.on('debug', (message) => (client.getChannel('592170164322041856') as TextChannel).createMessage(message))); } main();