Format, remove unnecessary imports in notify.ts

This commit is contained in:
2023-11-15 20:48:28 -06:00
parent 04cff74cbc
commit f71e8e3603

View File

@@ -1,4 +1,4 @@
import { Client, Events, GatewayIntentBits } from 'discord.js'; import { Client } from 'discord.js';
import { env } from '@/env/server.mjs'; import { env } from '@/env/server.mjs';
export async function sendNotification(message: string): Promise<void> { export async function sendNotification(message: string): Promise<void> {
@@ -10,8 +10,7 @@ export async function sendNotification(message: string): Promise<void> {
await client.login(env.DISCORD_TOKEN); await client.login(env.DISCORD_TOKEN);
} catch (e) { } catch (e) {
throw new Error( throw new Error(
`Failed while logging in to Discord: ${ `Failed while logging in to Discord: ${e instanceof Error ? e.message : e
e instanceof Error ? e.message : e
}` }`
); );
} }