Class: LibDiscord::Poll
Overview
Poll Resource
Do not instantiate a Poll directly. Instead request one from an instance of Client.
client = LibDiscord::Client.new("Bot auth.token")
p = client["poll"]
To create a poll, use Channel#create_message.
Instance Method Summary collapse
- #end_poll(channel_id:, message_id:) ⇒ Response
- #get_answer_voters(channel_id:, message_id:, answer_id:, params: {}) ⇒ Response
Methods inherited from Resource
Constructor Details
This class inherits a constructor from LibDiscord::Resource
Instance Method Details
#end_poll(channel_id:, message_id:) ⇒ Response
58 59 60 |
# File 'lib/lib_discord/poll.rb', line 58 def end_poll(channel_id:, message_id:) send_request(:post, "/channels/#{channel_id}/polls/#{}/expire") end |
#get_answer_voters(channel_id:, message_id:, answer_id:, params: {}) ⇒ Response
40 41 42 |
# File 'lib/lib_discord/poll.rb', line 40 def get_answer_voters(channel_id:, message_id:, answer_id:, params: {}) send_request(:get, "/channels/#{channel_id}/polls/#{}/answers/#{answer_id}", params:) end |