Skip to content
Merged
Changes from 8 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5cfcfb0
Allow committee-elect to update actions (and appear in auto-complete)
Thatsmusic99 May 24, 2025
aa327c4
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] May 24, 2025
87e097c
Address some Ruff errors
Thatsmusic99 May 24, 2025
17b1db2
Remove committee-elect check
Thatsmusic99 May 24, 2025
b172946
Remove committee-elect check
Thatsmusic99 May 24, 2025
ce5c6a5
Suppress CommitteeElectRoleDoesNotExistError
Thatsmusic99 May 24, 2025
de3c508
Fix final Ruff errors
Thatsmusic99 May 24, 2025
8e78b0a
Shorten expression for collecting committee/elect members
Thatsmusic99 May 24, 2025
cbc99e5
Make list command also non-committee
MattyTheHacker May 24, 2025
d05940b
Add a logging message
MattyTheHacker May 24, 2025
4650451
Merge branch 'allow-committee-elect-action-update' of github.com:CSSU…
MattyTheHacker May 24, 2025
0410964
Merge branch 'main' into allow-committee-elect-action-update
MattyTheHacker May 25, 2025
790636b
Merge branch 'main' into allow-committee-elect-action-update
MattyTheHacker May 27, 2025
6252439
Merge branch 'main' into allow-committee-elect-action-update
MattyTheHacker May 27, 2025
9730625
Update cogs/committee_actions_tracking.py
MattyTheHacker May 27, 2025
e9d6dbf
Apply suggestions from code review
MattyTheHacker May 27, 2025
cfac936
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] May 27, 2025
bddc4b5
Refactor fetching
MattyTheHacker May 27, 2025
78a3dd9
Merge main into allow-committee-elect-action-update
cssbhamdev Jun 12, 2025
c7311de
Merge main into allow-committee-elect-action-update
cssbhamdev Jun 13, 2025
3db1786
Add note about committee check
MattyTheHacker Jun 13, 2025
a2a1f32
Merge main into allow-committee-elect-action-update
cssbhamdev Jun 13, 2025
8d88100
Fix suggestions
MattyTheHacker Jun 13, 2025
d535819
Update cogs/committee_actions_tracking.py
MattyTheHacker Jun 14, 2025
09d6414
Update cogs/committee_actions_tracking.py
MattyTheHacker Jun 14, 2025
b02350e
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Jun 14, 2025
80f2607
Merge main into allow-committee-elect-action-update
cssbhamdev Jun 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cogs/committee_actions_tracking.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Contains cog classes for tracking committee-actions."""

import contextlib
import logging
import random
from enum import Enum
Expand All @@ -11,6 +12,7 @@

from db.core.models import AssignedCommitteeAction, DiscordMember
from exceptions import (
CommitteeElectRoleDoesNotExistError,
CommitteeRoleDoesNotExistError,
InvalidActionDescriptionError,
InvalidActionTargetError,
Expand Down Expand Up @@ -129,11 +131,15 @@ async def autocomplete_get_committee_members(
except CommitteeRoleDoesNotExistError:
return set()

with contextlib.suppress(CommitteeElectRoleDoesNotExistError):
committee_elect_role: discord.Role | None = await ctx.bot.committee_elect_role

return {
discord.OptionChoice(
name=f"{member.display_name} ({member.global_name})", value=str(member.id)
)
for member in committee_role.members
for member in set(committee_role.members)
| set((committee_elect_role.members) if committee_elect_role else set())
if not member.bot
}

Expand Down Expand Up @@ -281,7 +287,6 @@ async def create(
required=True,
parameter_name="status",
)
@CommandChecks.check_interaction_user_has_committee_role
@CommandChecks.check_interaction_user_in_main_guild
async def update_status(
self, ctx: "TeXBotApplicationContext", action_id: str, status: str
Expand Down