AutoMod/bridge/src/revolt/client.ts

21 lines
533 B
TypeScript
Raw Normal View History

2022-04-04 22:14:12 +02:00
import { Client } from '@janderedev/revolt.js';
import { logger } from '..';
const client = new Client({
messageTimeoutFix: true,
autoReconnect: true,
onPongTimeout: 'RECONNECT',
});
const login = () => new Promise((resolve: (value: Client) => void) => {
client.loginBot(process.env['REVOLT_TOKEN']!);
client.once('ready', () => {
logger.info(`Revolt: ${client.user?.username} ready - ${client.servers.size} servers`);
resolve(client);
});
});
import('./events');
export { client, login }