[ModLog] Optimise get_next_case_number() (#2908)

* [ModLog] Optimise get_next_case_number()

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Address reviews

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Add changelog entry

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Delete get_next_case_number

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Add modlog.get_latest_case() and fix `[p]reason`

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine
2019-08-03 00:49:23 +10:00
committed by Michael H
parent 9362dd9465
commit ef8b9b81c3
6 changed files with 86 additions and 81 deletions

View File

@@ -0,0 +1 @@
``redbot.core.modlog.get_next_case_number()`` has been removed.

View File

@@ -0,0 +1 @@
Fixed error in `[p]reason` when setting the reason for a case without a moderator.

View File

@@ -0,0 +1 @@
ModLog is now much faster at creating cases, especially in large servers.

View File

@@ -0,0 +1 @@
Added :func:`redbot.core.modlog.get_latest_case` to fetch the case object for the most recent ModLog case.