mirror of
https://github.com/Xevion/bus-reminder.git
synced 2025-12-06 07:14:30 -06:00
Format, remove unnecessary imports in notify.ts
This commit is contained in:
@@ -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
|
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user