WIP: Refactor Aurora (3.0.0) #29
No reviewers
Labels
No labels
bug
cog
cog
Aurora
cog
Backup
cog
Bible
cog
EmojiInfo
cog
Nerdify
cog
Pterodactyl
cog
SeaUtils
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…
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.
/edit
to the new model system/history
command/case
Moderation.from_sql_all()
/history
to 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 theModeration
class, along with removingfrom_sql
andget_all_cases
. also added some other classmethods to replace those. 9b0f977016aurora.utilities.utils.get_bool_emoji
to usematch/case
instead ofif/else
OFFSET
inModeration.get_latest()
a10af37f14__int__
dunder method to the moderation modelChange.from_dict()
methodChange.reason
optionalModeration.log()
to skip returning the class objectLIMIT 1
)aurora.utilities.utils.timedelta_from_string
not 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/history
command 987fc0dbf8/case
command preventing the cog from loading c28b089edbPermissionError
3b102debacctx
is acommands.Context
object before trying to use it inmoderate
target_type
lowercase ee49d5b10csilent
Moderation.get_target
method trying to get a channel object from a user idModeration
object__str__()
method of the
Type` classModeration.type
that was causing a TypeErrorsend_evidenceformat
is called outside of an Interaction context, as epheremal messages would be disabled in this case 9d0f2e3887on
more accurateModuleNotFoundError
being 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 argumentexpired
argument to the/history
commandall
all
all
type/edit
command not properly storing the data from the old moderation/edit
command failing again/edit
interaction
instead ofinteraction.client
to theduration_edit_handler
/edit
command/edit
command not setting the moderation's duration properlystr()
Change.from_dict()
a3ad38f338bot
key does not exist in theChange.from_dict()
data dictionaryNote
moderation type handler usingcls.string
instead ofcls.verb
repr
moderation_id
key in the moderation tables not nullable (NOT NULL
)[p]aurora info
commandsilent
an optional argument inAurora.moderate()
/case
breaking if a case is resolved but the resolving user doesn't exist anymoreView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.