Class LevelsDatabase

Hierarchy (view full)

Constructors

Properties

database: string = "forge.levels.db"
entityManager: {
    mongodb: MixedList<string | Function | EntitySchema<any>>;
    mysql: MixedList<string | Function | EntitySchema<any>>;
    postgres: MixedList<string | Function | EntitySchema<any>>;
    sqlite: MixedList<string | Function | EntitySchema<any>>;
} = ...
type?:
    | "mysql"
    | "postgres"
    | "mongodb"
    | "better-sqlite3"
    | "sqlite"
type:
    | "mysql"
    | "postgres"
    | "mongodb"
    | "better-sqlite3"
    | "sqlite"

Methods

  • Returns Promise<DataSource>

  • Atomically increments the message count for a member.

    Parameters

    • guildId: string
    • userId: string
    • recordExists: boolean = false

    Returns Promise<void>

  • Returns the resolved config with defaults applied

    Parameters

    • guildId: string

    Returns Promise<Required<Pick<ILevelConfig,
        | "enabled"
        | "xpMin"
        | "xpMax"
        | "xpCooldown"
        | "xpMultiplier"
        | "formula"
        | "xpBase"
        | "xpExponent"
        | "maxLevel"
        | "stackRoles">> & ILevelConfig>