diff --git a/GameFiles/Game.py b/GameFiles/Game.py index cab386b..bd51d62 100644 --- a/GameFiles/Game.py +++ b/GameFiles/Game.py @@ -286,7 +286,7 @@ class Game: ] message_content.extend([f"ยท <@{player_id}>" for player_id in self.get_players_id()]) message_content.append("Have a nice game!") - message = await announcements_chan.send("\n".join(message_content), allowed_mentions = discord.AllowedMentions(roles = True)) + message = await announcements_chan.send("\n".join(message_content), allowed_mentions = discord.AllowedMentions(roles = True, users = True)) await message.pin() logger.debug(f"[{self.guild.name}] Announced game start in announcements") asyncio.create_task(announce_game_start()) # We do not add it to the list of tasks to wait before game creation finishes because we do not care if it is executed after a while @@ -318,7 +318,7 @@ class Game: player_channel = await game_category.create_text_channel(player.name, overwrites = perms, position = position) self.config["player_info"][str(player.id)]["channel"] = player_channel.id logger.debug(f"[{self.guild.name}] Created channel for player {player.name}") - asyncio.create_task(player_channel.send(f"Hello! This is your private channel.\nIn here you can cast your votes, interact with the <@&{self.get_gm_role_id()}>, and write freely.\nHave a nice game!", allowed_mentions = discord.AllowedMentions.none())) + asyncio.create_task(player_channel.send(f"Hello! This is your private channel.\nIn here you can cast your votes, interact with the <@&{self.get_gm_role_id()}>, and write freely.\nHave a nice game!", allowed_mentions = discord.AllowedMentions(roles = True))) for i, player in enumerate(player_role.members): tasks.append(asyncio.create_task(create_player_channel(player, 5 + i))) @@ -385,9 +385,9 @@ class Game: message_content.append("**The vote has ended**") message_content_str = "\n".join(message_content) if self.config["vote"]["message"] is None: - self.config["vote"]["message"] = (await self.get_votes_channel().send(message_content_str, allowed_mentions = discord.AllowedMentions.none())).id + self.config["vote"]["message"] = (await self.get_votes_channel().send(message_content_str, allowed_mentions = discord.AllowedMentions(users = True))).id else: - await (await self.get_votes_channel().fetch_message(self.config["vote"]["message"])).edit(content = message_content_str, allowed_mentions = discord.AllowedMentions.none()) + await (await self.get_votes_channel().fetch_message(self.config["vote"]["message"])).edit(content = message_content_str, allowed_mentions = discord.AllowedMentions(users = True)) @vote_running @save_on_success @@ -420,7 +420,7 @@ class Game: announcement_content.append(":relaxed: The country has calmed and the chaos counter has been reset") self.config["chaos"] = 0 # Anyway, the chaos is reset by a successful vote self.config["vote"] = None - await self.get_announcements_channel().send("\n".join(announcement_content), allowed_mentions = discord.AllowedMentions(roles = True)) + await self.get_announcements_channel().send("\n".join(announcement_content), allowed_mentions = discord.AllowedMentions(roles = True, users = True)) # After announcing a non-passing vote, we increase the chaos and announce it if not passed: await self.increase_chaos()