Skip to content

Add support for searching infractions by infraction id#1787

Merged
mbaruh merged 7 commits into
mainfrom
support-infraction-id-search
Aug 31, 2021
Merged

Add support for searching infractions by infraction id#1787
mbaruh merged 7 commits into
mainfrom
support-infraction-id-search

Conversation

@TizzySaurus
Copy link
Copy Markdown
Contributor

Closes #1066.

Can now search infractions by infraction id via !infraction {id}, !infraction search {id} and !infraction search id {id}.

Exact implementation may be tweaked in the future, but got approval from @mbaruh to stick to this for now.

Can now search by infraction id via `!infraction {id}`, `!infraction search {id}` and `!infraction search id {id}`.
Changed `search_user` alias from `!i s user` to `!i s userid`
@TizzySaurus TizzySaurus self-assigned this Aug 27, 2021
@TizzySaurus TizzySaurus added a: API Related to or causes API changes a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: moderation Related to community moderation functionality: (moderation, defcon, verification) t: feature New feature or request labels Aug 27, 2021
Comment thread bot/exts/moderation/infraction/management.py Outdated
Comment thread bot/exts/moderation/infraction/management.py Outdated
@TizzySaurus TizzySaurus requested a review from Bluenix2 August 31, 2021 07:29
Comment thread bot/exts/moderation/infraction/management.py
Copy link
Copy Markdown
Contributor

@Bluenix2 Bluenix2 left a comment

Choose a reason for hiding this comment

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

Thanks Tizzy

mbaruh
mbaruh previously approved these changes Aug 31, 2021
Copy link
Copy Markdown
Member

@mbaruh mbaruh left a comment

Choose a reason for hiding this comment

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

After further consideration of the UX and future development, I think the command should stay at the top level without the infraction search and infraction search id part.

Sorry Tizzy 🙏

Comment thread bot/exts/moderation/infraction/management.py
@mbaruh mbaruh dismissed their stale review August 31, 2021 17:04

Wrong button

In order to search by infraction id, `!infraction {infr_id}` must be used instead of `!infraction search {infr_id}`/`!infraction search id {infr_id}`
@TizzySaurus TizzySaurus requested a review from mbaruh August 31, 2021 19:34
Comment thread bot/exts/moderation/infraction/management.py Outdated
@TizzySaurus TizzySaurus force-pushed the support-infraction-id-search branch from cfecad1 to 9c40605 Compare August 31, 2021 21:34
Comment thread bot/exts/moderation/infraction/management.py Outdated
Corrected the API endpoint and added error handling for 404 cases, and tidied some code
@TizzySaurus TizzySaurus force-pushed the support-infraction-id-search branch from 9c40605 to a86a6cc Compare August 31, 2021 21:48
Copy link
Copy Markdown
Member

@mbaruh mbaruh left a comment

Choose a reason for hiding this comment

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

Amazing 👌

@mbaruh mbaruh merged commit 75fa14d into main Aug 31, 2021
@mbaruh mbaruh deleted the support-infraction-id-search branch August 31, 2021 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: API Related to or causes API changes a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) a: moderation Related to community moderation functionality: (moderation, defcon, verification) t: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Search Infraction by ID functionality

4 participants