Lingo.CheckError exception (Lingo v0.4.2)

Copy Markdown View Source

A command that didn't pass one of its :checks, or is on cooldown (see Lingo.Bot.Commands.command/3).

Without a Lingo.Bot.handle_error/2, Lingo answers the user with message in an ephemeral reply. With one, the callback gets this error and the context, and answers as it likes.

reason is one of :guild_only, :dm_only, :nsfw, :owner_only, {:missing_permissions, permissions}, {:bot_missing_permissions, permissions}, {:cooldown, retry_after_ms} or {:check, function} for a custom check that failed.

Summary

Types

t()

@type t() :: %Lingo.CheckError{
  __exception__: true,
  message: String.t(),
  reason: term()
}