WIP: Refactor Aurora (3.0.0) #29
No reviewers
Labels
No labels
bug
cog
cog
Aurora
cog
Backup
cog
Bible
cog
EmojiInfo
cog
HotReload
cog
Nerdify
cog
Pterodactyl
cog
SeaUtils
cog
SentinelCore
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cswimr/SeaCogs!29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "aurora-pydantic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Aurora 2.4
This pull request does the following:
Implements Pydantic
Adds a moderation type registry (closes #25)
Adds custom moderation handlers (closes #31)
Allows for third party integration through the previously mentioned type registry and moderation handlers
Refactors all of the moderation commands to allow for hybrid or text commands to be added in the future (although this pr does not include them)
Fixes a bunch of small bugs in the previous version of Aurora
By submitting this pull request, I permit SeaswimmerTheFsh to license my work under
the Mozilla Public License Version 2.0.
/editto the new model system/historycommand/caseModeration.from_sql_all()/historyto use the new Moderation sql queriesModeration.execute()classmethod to accept a cursor, to prevent opening a new database connection on every call 460d5a31fcget_next_case_number()into theModerationclass, along with removingfrom_sqlandget_all_cases. also added some other classmethods to replace those. 9b0f977016aurora.utilities.utils.get_bool_emojito usematch/caseinstead ofif/elseOFFSETinModeration.get_latest()a10af37f14__int__dunder method to the moderation modelChange.from_dict()methodChange.reasonoptionalModeration.log()to skip returning the class objectLIMIT 1)aurora.utilities.utils.timedelta_from_stringnot including days in its calculationsChange.from_dict()to useutils.timedelta_from_string()aiosqlite's logging level to warning eebddd6e89Aurora.handle_expiry()to useModeration.execute()instead of opening its own connections 42f7f9f69bModeration.execute()e988917319AuroraBaseModel.to_json()not usingAuroraBaseModel.dump()60d4afc6f3/historycommand 987fc0dbf8/casecommand preventing the cog from loading c28b089edbPermissionError3b102debacctxis acommands.Contextobject before trying to use it inmoderatetarget_typelowercase ee49d5b10csilentModeration.get_targetmethod trying to get a channel object from a user idModerationobject__str__()method of theType` classModeration.typethat was causing a TypeErrorsend_evidenceformatis called outside of an Interaction context, as epheremal messages would be disabled in this case 9d0f2e3887onmore accurateModuleNotFoundErrorbeing caused by a typoThis pull request is feature complete! All that needs to be done still is documentation.
Edit: nope lol I forgot about migrating old data from 1.0
WIP: Implement Pydantic in Aurorato WIP: Refactor Aurora (2.4)WIP: Refactor Aurora (2.4)to WIP: Refactor Aurora (3.0.0)/history's types argumentexpiredargument to the/historycommandallallalltype/editcommand not properly storing the data from the old moderation/editcommand failing again/editinteractioninstead ofinteraction.clientto theduration_edit_handler/editcommand/editcommand not setting the moderation's duration properlystr()Change.from_dict()a3ad38f338botkey does not exist in theChange.from_dict()data dictionaryNotemoderation type handler usingcls.stringinstead ofcls.verbreprmoderation_idkey in the moderation tables not nullable (NOT NULL)[p]aurora infocommandsilentan optional argument inAurora.moderate()/casebreaking if a case is resolved but the resolving user doesn't exist anymorenixpkgs-pythonto get python version instead of settinglanguages.python.packageec08130f99red-discordbotand addpip8aaa5bd33e-vvvin the launch and debug optionsPull request closed