PollAnswerVoterManager
ManagerOn this page
PollAnswerVoterManager is the cache and REST facade for PollAnswerVoter objects owned by the parent. Typical calls are fetch, create, edit, delete, resolve, and resolveId.
Constructor
PollAnswerVoterManager.new(client, answer) The class table is callable, so PollAnswerVoterManager(client, answer) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
client |
any |
required | Passed through to the implementation as written. |
answer |
any |
required | Passed through to the implementation as written. |
local discord = require("discord")
local object = discord.PollAnswerVoterManager({}, {})Properties
- Name
answer- Type
any- Access
- readonly
- Description
- Instance field
PollAnswerVoterManager.answer. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this PollAnswerVoterManager.
Methods
PollAnswerVoterManager:fetch()
#Request a fresh copy of this resource from REST and update the cache.
Signature
PollAnswerVoterManager:fetch(options, callback) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
options |
table |
optional | Lua option table. Field names match the corresponding DiscordLua option type when one exists. |
callback |
function |
optional | Optional completion callback function(err, result). If omitted, failures raise a DiscordLua error. |
Returns
PollAnswerVoterManager — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a PollAnswerVoterManager
object:fetch({}, function(err, result)
if err then error(err) end
end)Examples
local discord = require("discord")
local object = discord.PollAnswerVoterManager({})Related APIs
ApplicationCommandManager · ApplicationCommandPermissionsManager · ApplicationEmojiManager · AutoModerationRuleManager · BaseGuildEmojiManager · BaseManager · CachedManager · CategoryChannelChildManager
Version: discord 1.2.4 · runtime 1.0.0