forge.timers
    Preparing search index...

    Class Timer

    A stored row.

    Hierarchy (View Summary)

    Implements

    Index
    args?: string[]

    The command arguments this timer was scheduled with.

    authorID?: string | null

    The id of the user that scheduled this timer.

    channelID?: string | null

    The id of the channel this timer has been created in, if any.

    code: string

    The ForgeScript code this timer executes.

    commandName?: string | null

    The name of the command this timer was scheduled from.

    config?: IStoredOverrides | null

    The options this timer was scheduled with.

    cron?: string | null

    The cron expression this timer runs on, when it is one.

    duration: number

    The delay of this timeout, or the tick length of this interval, in ms. Always 0 for a cron.

    fireAt: number

    The timestamp this timer is next due to fire at.

    guildID?: string | null

    The id of the guild this timer has been created on.

    id: string

    The id of this timer, in the form kind:name.

    kind: TimerKind

    The kind of the timer.

    messageID?: string | null

    The id of the message this timer was scheduled from.

    name: string

    The name this timer was scheduled under.

    path?: string | null

    The path of the command this timer was scheduled from.

    pausedAt?: number | null

    The timestamp this timer was paused at, or null while it is running.

    timestamp: number

    The timestamp this timer has been created at.

    timezone?: string | null

    The zone that expression is read in, or null for whatever the process runs in.

    The serializable variables present when this timer was scheduled.

    version?: number | null

    Variable schema this row was written under. Null predates it and means v0.

    MAX_ID_LENGTH: 255

    Primary keys are varchar(255) on mysql, and a longer id is rejected.

    SCHEMA_VERSION: 1 = VARS_SCHEMA_VERSION

    What this build writes.

    • Whether this timer keeps to an expression rather than to a gap.

      Returns this is Timer & { cron: string }

    • Returns whether this timer was due while the app was down.

      Returns boolean

    • Whether this timer is on hold, and so neither running nor falling behind.

      Returns boolean

    • Ticks elapsed since it was last due. Always 0 for timeouts, they fire once.

      Parameters

      • limit: number = Infinity

      Returns number

    • Returns how long past due this timer is, or 0 if it isn't yet.

      Returns number