Skip to content

Commit

Permalink
FUCK OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
MattyTheHacker committed Jun 21, 2024
1 parent 1a998a0 commit 1becdc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cogs/committee_actions_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ async def list_all_actions(self, ctx:TeXBotApplicationContext) -> None:
main_guild: discord.Guild = self.bot.main_guild
committee_role: discord.Role = await self.bot.committee_role

actions: list[Action] = await sync_to_async(Action.objects.all)()
actions: list[Action] = list(await sync_to_async(Action.objects.all)())

committee_members: set[discord.Member] = {member for member in main_guild.members if not member.bot and committee_role in member.roles} # noqa: E501

committee_actions: dict[discord.Member, list[Action]] = {committee: [action async for action in actions if action.discord_member.hashed_discord_id == DiscordMember.hash_discord_id(committee.id)] for committee in committee_members} # noqa: E501
committee_actions: dict[discord.Member, list[Action]] = {committee: [action for action in actions if action.discord_member.hashed_discord_id == DiscordMember.hash_discord_id(committee.id)] for committee in committee_members} # noqa: E501

all_actions_message: str = "\n".join([f"Listing all actions by committee member:\n{committee.mention}, Actions:\n{', \n'.join(str(action.description) for action in actions)}" for committee, actions in committee_actions.items()]) # type: ignore[attr-defined] # noqa: E501

Expand Down

0 comments on commit 1becdc8

Please sign in to comment.