Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PollManager

Hierarchy

Implements

  • PollManagerInterface

Constructors

constructor

Properties

Readonly cache

cache: Collection<string, Poll>

Readonly client

client: Client

Readonly group

group: Group

Readonly holds

holds: typeof Poll

Methods

_remove

  • _remove(data: Poll): boolean
  • Parameters

    Returns boolean

_upsert

create

  • create(question: string, options: string[], settings?: object): Promise<Poll>
  • Parameters

    • question: string
    • options: string[]
    • Optional settings: object
      • Optional allowMultipleResponses?: boolean
      • Optional duration?: number
      • Optional endAt?: Date
      • Optional public?: boolean

    Returns Promise<Poll>

fetch

  • Returns Promise<Collection<string, Poll>>

  • Parameters

    • id: string

    Returns Promise<Poll>

resolve

  • resolve(data: unknown): null | Poll
  • Parameters

    • data: unknown

    Returns null | Poll

resolveId

  • resolveId(data: unknown): null | string
  • Parameters

    • data: unknown

    Returns null | string

Generated using TypeDoc