Class SessionCollection

Collection of Sessions

Hierarchy

Constructors

Properties

#objects: ReactiveMap<string, Session> = ...
#storage: ObjectStorage<HydratedSession> = ...
client: Client
getUnderlyingObject: ((id) => HydratedSession)

Type declaration

    • (id): HydratedSession
    • Parameters

      • id: string

      Returns HydratedSession

updateUnderlyingObject: SetStoreFunction<Record<string, HydratedSession>>

Methods

  • Create a new instance of an object

    Parameters

    • id: string

      Id

    • type: "user" | "server" | "channel" | "bot" | "channelUnread" | "channelWebhook" | "emoji" | "message" | "serverMember" | "session"

      Type

    • instance: Session

      Instance

    • context: unknown

      Context

    • Optional data: unknown

      Data

    Returns void

  • Delete all sessions, optionally including self

    Parameters

    • revokeSelf: boolean = false

      Whether to remove current session too

    Returns Promise<void>

  • Execute a provided function over each key, value pair in the map

    Parameters

    • cb: ((value, key, map) => void)

      Callback for each pair

        • (value, key, map): void
        • Parameters

          Returns void

    Returns void

    Iterable

Generated using TypeDoc