/** * @copyright nhcarrigan * @license Naomi's Public License * @author Naomi Carrigan */ import { WebhookClient, type MessageCreateOptions } from "discord.js"; const hook = new WebhookClient({ url: process.env.DISCORD_DEBUG_WEBHOOK ?? "", }); /** * Quick wrapper to send a debug message to the webhook. * Modularised for future expansion if needed. * @param message -- The message payload, compatible with Discord's API. */ export const sendDebugLog = async( message: MessageCreateOptions, ): Promise => { await hook.send({ ...message, avatarURL: "https://cdn.nhcarrigan.com/art/logs.png", username: "Moderation Logs", }); };