Poll

Poll

new Poll(client, data, options)

Description:
  • Creates the structure for a poll.

Source:
Parameters:
Name Type Description
client Client

The client instance.

data Object

The raw poll data from Discord.

options Object

The additional options for this structure.

Properties
Name Type Description
guildId String

The ID of the guild that this poll belongs to.

Members

(readonly) _results :MessagePollManager

Description:
  • The poll responses.

Source:

The poll responses.

Type:

(readonly) allowMultiselect :Boolean

Description:
  • Whether the poll allows multiselect.

Source:

Whether the poll allows multiselect.

Type:
  • Boolean

(readonly) answers :Array.<Object>

Description:
  • The answers of the poll.

Source:

The answers of the poll.

Type:
  • Array.<Object>

(readonly) expiry :Number

Description:
  • The UNIX timestamp of the expiry time for the poll.

Source:

The UNIX timestamp of the expiry time for the poll.

Type:
  • Number

(readonly) guild :Guild

Description:
  • The guild that this poll belongs to.

Source:

The guild that this poll belongs to.

Type:

(readonly) guildId :String

Description:
  • The ID of the guild that this poll belongs to.

Source:

The ID of the guild that this poll belongs to.

Type:
  • String

(readonly) layoutType :String

Description:
  • The layout type of the poll.

Source:

The layout type of the poll.

Type:
  • String

(readonly) question :String

Description:
  • The question of the poll.

Source:

The question of the poll.

Type:
  • String

(readonly) rawLayoutType :Number

Description:
  • The raw layout type of the poll.

Source:

The raw layout type of the poll.

Type:
  • Number

Methods

toJSON(format) → {Object}

Description:
  • Returns the JSON representation of this structure.

Source:
Parameters:
Name Type Description
format Number

The format to return the data in.

Returns:
Type
Object

toString()

Source: