Class StatsManagerAbstract

Creates a new StatsManager instance

Hierarchy

  • StatsManager

Constructors

Properties

_statsModules: StatsModule[]
debuggingMode: boolean
enabledStats: EnabledStats
scheduleCron: string

Accessors

Methods

  • Add custom module to your stats manager.

    Returns

    Example

    const customModule = new StatsModule("custom", { graphType: GraphType.LINE, dataType: "number" });
    statsManager.addModules([customModule]);
    statsManager.findModule("custom"); // => customModule

    Throws

    If the module is already added.

    Throws

    If the module has not a valid graph type.

    Throws

    If the module has not a valid data type.

    Parameters

    Returns void

  • Deletes the stats.

    Abstract

    Parameters

    • timestamps: number[]

      The timestamps of the stats to delete.

    Returns Promise<void>

  • Acquires the stats.

    Returns

    Example

    statsManager.start(async () => {
    return {
    ram: Math.round((process.memoryUsage().heapUsed / 1024 / 1024) * 100) / 100,
    servers: client.guilds.size,
    users: client.users.size,
    }
    });

    Throws

    If the stats are not acquired.

    Throws

    If the stats are not acquired in the correct format.

    Parameters

    Returns Promise<void>

Generated using TypeDoc