mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
[ModLog API] Add default casetypes, remove need for a specific auditlog action (#2901)
* I know this needs a changelog entry and docs still * update tests for new behavior * update docs, filter; add changelog * Ready for review * stop fetching the same Audit logs when the bot is the mod * I forgot to press save * fix a comprehension * Fix AttributeError * And the other place that happens * timing fixes
This commit is contained in:
@@ -57,9 +57,6 @@ it from your setup function:
|
||||
"default_setting": True,
|
||||
"image": "\N{HAMMER}",
|
||||
"case_str": "Ban",
|
||||
# audit_type should be omitted if the action doesn't show
|
||||
# up in the audit log.
|
||||
"audit_type": "ban",
|
||||
}
|
||||
try:
|
||||
await modlog.register_casetype(**ban_case)
|
||||
@@ -73,14 +70,12 @@ it from your setup function:
|
||||
"default_setting": True,
|
||||
"image": "\N{BUST IN SILHOUETTE}\N{HAMMER}",
|
||||
"case_str": "Hackban",
|
||||
"audit_type": "ban",
|
||||
},
|
||||
{
|
||||
"name": "kick",
|
||||
"default_setting": True,
|
||||
"image": "\N{WOMANS BOOTS}",
|
||||
"case_str": "Kick",
|
||||
"audit_type": "kick"
|
||||
}
|
||||
]
|
||||
await modlog.register_casetypes(new_types)
|
||||
|
||||
Reference in New Issue
Block a user