Closed MinnDevelopment closed 4 months ago
Closes Issue: #2646
Adds support for message polls.
Reference: https://github.com/discord/discord-api-docs/pull/6746
MessagePoll
MessagePollData
MessagePollBuilder
Message#getPoll()
MessageCreateRequest#setPoll(MessagePollData)
Message#replyPoll(MessagePollData)
IReplyCallback#replyPoll(MessagePollData)
MessageChannel#sendMessagePoll(MessagePollData)
Message#endPoll()
MessageChannel#endPollById(String)
Message#retrievePollVoters(long)
MessageChannel#retrievePollVoters(String|long, long)
MessagePollAdd/RemoveEvent
Checks.notLonger(Duration, Duration, TimeUnit, String)
<T>CheckAssertions
AbstractSocketHandlerTest
channel.sendMessage("Hello guys! Check my poll:") .setPoll( MessagePollData.builder("Which programming language is better?") .addAnswer("Java", Emoji.fromFormatted("<:java:1006323566314274856>")) .addAnswer("Kotlin", Emoji.fromFormatted("<:kotlin:295940257797636096>")) .build()) .queue()
Pull Request Etiquette
Changes
Closes Issue: #2646
Description
Adds support for message polls.
Reference: https://github.com/discord/discord-api-docs/pull/6746
Feature Additions
MessagePoll
MessagePollData
MessagePollBuilder
Message#getPoll()
MessageCreateRequest#setPoll(MessagePollData)
Message#replyPoll(MessagePollData)
IReplyCallback#replyPoll(MessagePollData)
MessageChannel#sendMessagePoll(MessagePollData)
Message#endPoll()
MessageChannel#endPollById(String)
Message#retrievePollVoters(long)
MessageChannel#retrievePollVoters(String|long, long)
MessagePollAdd/RemoveEvent
Internal Additions
Checks.notLonger(Duration, Duration, TimeUnit, String)
Test Additions
<T>CheckAssertions
A new way to test checks, similar to other assertion chains.
AbstractSocketHandlerTest
Tests for socket handlers
Example: Sending poll