Send debugs to see reason for ws disconnect

merge-requests/13/head
Bsian 2020-05-20 12:17:47 +01:00
parent 817328a49d
commit ecaa861135
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@
*/ */
import { parse } from 'yaml'; import { parse } from 'yaml';
import { promises as fs } from 'fs'; import { promises as fs } from 'fs';
import { TextChannel } from 'eris';
import { Client } from './class'; import { Client } from './class';
async function main(): Promise<void> { async function main(): Promise<void> {
@ -16,6 +17,7 @@ async function main(): Promise<void> {
await client.loadEvents(); await client.loadEvents();
await client.loadCommands(); await client.loadCommands();
client.connect(); client.connect();
client.once('ready', () => client.on('debug', (message) => (client.getChannel('592170164322041856') as TextChannel).createMessage(message)));
} }
main(); main();