Skip to content
GitHub

cooldownStoreMessage

function in meocord/common Since 4.1.0

cooldownStoreMessage(): string

The answer the built-in fallback gives a call CooldownStoreError refused, in English.

An app translates it as meocord.cooldown.storeDown in its catalogs, and translateError gives it in a user's language.

Returns

string

The answer, in English.

Examples

TypeScript
@Catch(CooldownStoreError)
export class StoreDownFilter implements ExceptionFilter<CooldownStoreError> {
  async catch(error: CooldownStoreError, context: ExecutionContext) {
    // MeoCord's words, and where to follow the outage
    await context.response?.error(error, { message: `${cooldownStoreMessage()} Status: https://status.example.com` })
  }
}