generated from nhcarrigan/template
feat: Update Error Notifications with ComponentsV2 (#14)
## Summary This PR updates Rosalia's Discord error notifications to use Discord's Components V2 for a beautiful, organized display. ### Changes Made - **Removed @mention** - Error notifications no longer ping anyone - **Updated channel** - Notifications now go to the correct channel (1474606829504954511) - **Implemented ComponentsV2** - Using Container (type 17) with Text Display (type 10) components - **Visual improvements**: - Added accent color (#E91E63) for the container - Added separators (type 14) between sections - Organized content with headers for scope, message, and stack trace - Code blocks for message and stack trace ### Technical Changes 1. **`src/modules/pipeLog.ts`**: - Created `PipeErrorOptions` and `DiscordErrorPayloadOptions` interfaces - Refactored `pipeError` to accept options object - Extracted payload creation into `createDiscordErrorPayload` helper - Implemented ComponentsV2 structure with container, text displays, and separators 2. **`src/utils/errorHandler.ts`**: - Updated error handler to use new `pipeError` interface 3. **`src/server/serve.ts`**: - Updated `/error` webhook endpoint to use new interface ✨ Created by Hikari~ 🌸 Reviewed-on: #14 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com>
This commit was merged in pull request #14.
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@
|
||||
"dependencies": {
|
||||
"discord-verify": "1.2.0",
|
||||
"fastify": "5.2.1",
|
||||
"fastify-raw-body": "^5.0.0",
|
||||
"fastify-raw-body": "5.0.0",
|
||||
"nodemailer": "6.10.0",
|
||||
"stripe": "18.3.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user