Maybe we could explore instead of using MessageCreate, using MessageUpdate. Idk if poll message is updated when it ended, so we probably could access to more properties and also we could possibly get the result even in DRAWS.
This could be handle on another PR since this PR is all based on messageCreate event and the embed that appears when poll end
Currently to get poll votation results we are using MessageCreate event. This would give us the Embed message that is sent when a poll ends. When there is a clear winner on the poll, it'll contain the victor_answer_text which says what is the number that won the votation.
However, this doesn't works when the votation is a DRAW, since it doesn't contains the winner number.
In order to be able to support DRAWS, I think we could explore the possibility to use MessageUpdate, since it is possible that this event was fired when the poll is updated to block itself. And maybe there we could get all the poll information even in a DRAW, so we can calculate the winner based on the results.
Blocked by https://github.com/TeamNovaSoft/discord-bot/pull/29
Overview
Currently to get poll votation results we are using MessageCreate event. This would give us the Embed message that is sent when a poll ends. When there is a clear winner on the poll, it'll contain the
victor_answer_text
which says what is the number that won the votation.However, this doesn't works when the votation is a DRAW, since it doesn't contains the winner number.
In order to be able to support DRAWS, I think we could explore the possibility to use MessageUpdate, since it is possible that this event was fired when the poll is updated to block itself. And maybe there we could get all the poll information even in a DRAW, so we can calculate the winner based on the results.