Add support for searching infractions by infraction id#1787
Merged
Conversation
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`
Bluenix2
reviewed
Aug 27, 2021
Bluenix2
reviewed
Aug 31, 2021
mbaruh
previously approved these changes
Aug 31, 2021
Member
mbaruh
left a comment
There was a problem hiding this comment.
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 🙏
In order to search by infraction id, `!infraction {infr_id}` must be used instead of `!infraction search {infr_id}`/`!infraction search id {infr_id}`
mbaruh
reviewed
Aug 31, 2021
cfecad1 to
9c40605
Compare
mbaruh
reviewed
Aug 31, 2021
Corrected the API endpoint and added error handling for 404 cases, and tidied some code
9c40605 to
a86a6cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.