Skip to content

Strike system improvements#462

Merged
MattyTheHacker merged 40 commits intomainfrom
71-strikes-functionality
May 12, 2025
Merged

Strike system improvements#462
MattyTheHacker merged 40 commits intomainfrom
71-strikes-functionality

Conversation

@MattyTheHacker
Copy link
Copy Markdown
Member

@MattyTheHacker MattyTheHacker commented Apr 14, 2025

No description provided.

@MattyTheHacker MattyTheHacker added the enhancement New feature or request label Apr 14, 2025
@MattyTheHacker MattyTheHacker self-assigned this Apr 14, 2025
@MattyTheHacker MattyTheHacker linked an issue Apr 14, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Member

@CarrotManMatt CarrotManMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to confirm you have considered the ephemerality of all of the responses in these new command. I see that there is a mix and I think we should err on the side of being ephemeral for displaying strike counts so that we don't end up unintentionally leaking it to be visible to non-committee members.

@MattyTheHacker
Copy link
Copy Markdown
Member Author

Just want to confirm you have considered the ephemerality of all of the responses in these new command. I see that there is a mix and I think we should err on the side of being ephemeral for displaying strike counts so that we don't end up unintentionally leaking it to be visible to non-committee members.

yeah this is a skill issue on my part, I intend to fix Soon:tm:

@CarrotManMatt
Copy link
Copy Markdown
Member

No worries, cheers!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the strike system by updating how strikes are incremented and adding new slash commands to query and decrement strikes.

  • Updated strike increment logic to use Django's F expressions for a concurrency-safe update.
  • Added two new slash commands: one for retrieving a user's strike count and another for decrementing strikes.
  • Extended the deletion command group to support deleting all strike records in the database.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cogs/strike.py Updated strike increment logic and added new slash commands for getting and decrementing strikes.
cogs/delete_all.py Added a new command to delete all strike records from the database.

Comment thread cogs/strike.py Outdated
@MattyTheHacker
Copy link
Copy Markdown
Member Author

This should be ready now, I couldn't figure out why the F string thing wasn't working so have changed it back

Comment thread cogs/strike.py Outdated
Comment thread cogs/strike.py Outdated
@CarrotManMatt
Copy link
Copy Markdown
Member

CarrotManMatt commented May 12, 2025

F string thing wasn't working

As in wasn't working when running the bot on the dev testing discord server? Or just the comments that copilot made?

@MattyTheHacker
Copy link
Copy Markdown
Member Author

tested too in the dev server and it actually didn't work, kept throwing this error:
(decrement_strikes) {'strikes': ['“F(strikes) - Value(1)” value must be an integer.']} for both places

@MattyTheHacker MattyTheHacker merged commit 4196e40 into main May 12, 2025
9 checks passed
@MattyTheHacker MattyTheHacker deleted the 71-strikes-functionality branch May 12, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add get & decrease strikes commands

3 participants