Closed LeadcodeDev closed 6 months ago
Polls introduced to Discord's HTTP API. See more here
{channel}.send()
// Constructors final poll = Poll( question: PollQuestion(content: 'What is your favorite programming language ?'), answers: [ PollAnswer(content: 'Dart', emoji: PartialEmoji.fromEmoji(emoji!)), PollAnswer(content: 'Java', emoji: PartialEmoji.fromUnicode('๐')), PollAnswer(content: 'Python'), PollAnswer(content: 'JavaScript'), ], expireAt: Duration(days: 6), isAllowMultiple: true, layout: PollLayout.initial);
// Builder final poll = PollBuilder() .setQuestion(question: 'What is your favorite programming language ?') .addAnswer(answer: 'Dart', emoji: PartialEmoji.fromEmoji(emoji!)) .addAnswer(answer: 'Java', emoji: PartialEmoji.fromUnicode('๐')) .addAnswer(answer: 'Python') .addAnswer(answer: 'JavaScript') .setExpireAt(Duration(days: 6)) .allowMultipleResponses(true) .setLayout(PollLayout.initial) .build();
Polls introduced to Discord's HTTP API. See more here
Implementation
{channel}.send()
methodProposal