Classcorev0.5.0
WebhookLog
Base class for subscribers that deliver their event to a Discord webhook.
Declare the url's environment variable with @WebhookUrl and implement report. Url resolution, validation, sender reuse, and sending run in the base. When the variable is unset the reporter is skipped at registration with a boot warning.
abstract class WebhookLog<
KeyOfSubscribers extends SubscriptionKey,
TCore extends CoreBase
> extends Subscriber<KeyOfSubscribers, TCore>Member visibility
Filter class members by access level.
constructor
Instantiates the subscriber with event data and core.
Subscriber(data: AllSubscriptions[KeyOfSubscribers], core: TCore)Parameter:
dataThe subscriber event data
Parameter:
coreThe core framework instance
Inherited from:Subscriber
KeyOfSubscribers
The subscription key this reporter receives
KeyOfSubscribers extends SubscriptionKeyTCore
The transport's Core
TCore extends CoreBasecore
protected readonly core: TCoreInherited from:Subscriber
data
protected readonly data: AllSubscriptions[KeyOfSubscribers]Inherited from:Subscriber
logger
protected readonly logger: LoggerInherited from:Subscriber
public abstract report(
suppressed: number
): WebhookReport | Promise<WebhookReport>Parameter:
suppressedHow many events were dropped since the last card