Wikipedia command port from grace to ada#15
Merged
PenguinBoi12 merged 5 commits intoCode-Society-Lab:mainfrom May 3, 2026
Merged
Wikipedia command port from grace to ada#15PenguinBoi12 merged 5 commits intoCode-Society-Lab:mainfrom
PenguinBoi12 merged 5 commits intoCode-Society-Lab:mainfrom
Conversation
PenguinBoi12
reviewed
May 2, 2026
Collaborator
There was a problem hiding this comment.
Very good PR so far. It's clean, well typed and you used matrix.py very well. I've let a few comments but only simple stuff. GG so far.
Don't forget to run black . to format the code, add some unit tests and validate types with mypy (although it seems fine).
Well done!!! As always, don't hesitate if you have any questions.
PenguinBoi12
approved these changes
May 3, 2026
PenguinBoi12
requested changes
May 3, 2026
PenguinBoi12
approved these changes
May 3, 2026
Collaborator
PenguinBoi12
left a comment
There was a problem hiding this comment.
Awesome, well done!
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.
Ports Grace's Wikipedia command to Ada as
!wiki <query>.bot/extensions/wikipedia_extension.pyasyncio,json, andurllibHow it works
asyncio.to_thread()so it does not block the bot.Example
User:
Response example:
Screenshot:
Error cases
!wiki→Please provide a search query. Usage: !wiki <search query>!wiki asdfghjklqwerty→No results found for 'asdfghjklqwerty'.Search query is too long. Please limit it to 300 characters or less.Unexpected response format from Wikipedia API.Sorry, I couldn't reach Wikipedia.