Skip to content
Merged
Changes from 5 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
18 changes: 15 additions & 3 deletions cogs/committee_actions_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,25 @@
except CommitteeRoleDoesNotExistError:
return set()

try:
committee_elect_role: discord.Role = await ctx.bot.committee_elect_role
except CommitteeElectRoleDoesNotExistError:

Check failure on line 134 in cogs/committee_actions_tracking.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (F821)

cogs/committee_actions_tracking.py:134:16: F821 Undefined name `CommitteeElectRoleDoesNotExistError`
pass # We'll just continue with the fact that committee exists

Check failure on line 135 in cogs/committee_actions_tracking.py

View workflow job for this annotation

GitHub Actions / ruff-lint

Ruff (SIM105)

cogs/committee_actions_tracking.py:132:9: SIM105 Use `contextlib.suppress(CommitteeElectRoleDoesNotExistError)` instead of `try`-`except`-`pass`

committee_members = [member for member in committee_role.members if not member.bot]

# Add committee-elect if the role is found
if committee_elect_role:
for member in committee_elect_role.members:
if member in committee_members or member.bot:
continue
committee_members.append(member)

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

@staticmethod
Expand Down Expand Up @@ -281,7 +294,6 @@
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
Loading