Fault
A generic fault you throw after catching an error you do not have a specific message for.
The user sees a fixed generic reply with the tracking uuid, never the cause. report defaults to true, so the framework logs it and publishes it to the handledException bus. Pass report: false to show the generic reply without the bus publish. The original error is stored as the standard cause, so the real stack reaches the webhook. When the user should see a real message for a fault, subclass Notice and write your own render instead.
The framework also renders this for an unhandled throw, where it points the user at ctx.developerUsername.
class Fault extends NoticeMember visibility
Filter class members by access level.
ephemeral
Whether the reply is ephemeral, seen only by the invoking user. Set it false for a refusal the whole channel should see.
report
Whether this denial is a reported fault. True also logs it and publishes it to the handledException bus. The user always sees render either way.
- optional
summary
A short one-line reason. When every arm of an or gate refuses and each one sets this, or throws a refusal listing them under You need to meet at least one of these:. Write a verb phrase that finishes that line, for example, "be the bot owner".
public render(ctx: RenderContext): ReplyResponse