# Pastebin R3ukTWoV my $poll = await $message.channel.send-message(embed => %payload).then(-> $p { my $m = $p.result; await $m.add-reaction($reaction-for-emote); sleep(1/2); await $m.add-reaction($reaction-against-emote); $m; }); start react { whenever Promise.in($voting-timeout) { done } my Int $yes-votes = 0; my Int $no-votes = 0; whenever $poll.events -> $event { if $event eq 'MESSAGE_REACTION_ADD' { $yes-votes++ if $event eq $reaction-for-emote; $no-votes++ if $event eq $reaction-against-emote; $message.channel.send-message("yes: $yes-votes, no: $no-votes"); } elsif $event eq 'MESSAGE_REACTION_REMOVE' { $yes-votes-- if $event eq $reaction-for-emote; $no-votes-- if $event eq $reaction-against-emote; $message.channel.send-message("yes: $yes-votes, no: $no-votes"); } } }