Class SessionCollection

Collection of Sessions

Hierarchy (View Summary)

Constructors

Properties

client: Client
getUnderlyingObject: (id: string) => 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

    • Optionaldata: unknown

      Data

    Returns void

  • Delete all sessions, optionally including self

    Parameters

    • revokeSelf: boolean = false

      Whether to remove current session too

    Returns Promise<void>