Error Reporting
Bight’s diagnostics hub catches errors from commands, interactions, and scheduled tasks. The @bight-ts/plugin-ops error reporter subscribes to these events and forwards them to your monitoring tool (Sentry, Datadog, a Discord webhook, etc).
Expose your error reporter as a service, then configure the plugin:
import { createErrorReporterPlugin } from "@bight-ts/plugin-ops";
export const errorReporterPlugin = createErrorReporterPlugin({ getReporter: (context) => context.services.sentryReporter,
includeCommandErrors: true, includeInteractionErrors: true, includeTaskFailures: true,});Add to src/plugins/index.ts.
Behavior
Section titled “Behavior”Errors recorded by this plugin do not crash the Node.js process, the diagnostics hub handles them gracefully.
The reporter receives structured event data (command name, user ID, guild ID, error message) so your monitoring tool can filter and alert effectively.