If auto end vote is off, ping GM when everybody has voted
This commit is contained in:
parent
7e60012118
commit
f0c164fd51
|
|
@ -434,8 +434,11 @@ class Game:
|
||||||
if not self.can_cast_votes():
|
if not self.can_cast_votes():
|
||||||
raise RuntimeError("Votes can not be casted right now")
|
raise RuntimeError("Votes can not be casted right now")
|
||||||
self.config["vote"][str(user.id)] = vote
|
self.config["vote"][str(user.id)] = vote
|
||||||
if self.get_auto_end_vote() and all(self.config["vote"][str(player_id)] is not None for player_id in self.get_players_id()):
|
if all(self.config["vote"][str(player_id)] is not None for player_id in self.get_players_id()):
|
||||||
asyncio.create_task(self.stop_vote())
|
if self.get_auto_end_vote():
|
||||||
|
asyncio.create_task(self.stop_vote())
|
||||||
|
else:
|
||||||
|
asyncio.create_task(self.get_gm_channel().send(f"<@&{self.get_gm_role_id()}> Everybody has voted", allowed_mentions = discord.AllowedMentions(roles = True)))
|
||||||
await self.update_vote_message()
|
await self.update_vote_message()
|
||||||
|
|
||||||
@vote_running
|
@vote_running
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue