[V3 Modlog] add events for modlog cases (#1717)

* Give modlog case objects the bot as an attribute

* Dispatch modlog_case_create and modlog_case_edit events

* case.bot, not just bot

* fix a couple more issues resulting from refactor

* Case.edit doesn't need the bot parameter lol

* Make create_case return the case object (because tests)

* Modify create_case docstring

* Fix a docstring
This commit is contained in:
palmtree5
2018-05-27 21:18:50 -08:00
committed by GitHub
parent 6ae02d2d02
commit 05ad3fcd5c
3 changed files with 40 additions and 43 deletions

View File

@@ -146,5 +146,5 @@ class ModLog:
if case_before.moderator != author:
to_modify["amended_by"] = author
to_modify["modified_at"] = ctx.message.created_at.timestamp()
await case_before.edit(self.bot, to_modify)
await case_before.edit(to_modify)
await ctx.send(_("Reason has been updated."))