[ModLog] Prevent duplicate kwarg error (#2848)

* [ModLog] Prevent duplicate kwarg error

The `name` key used to be set in the Config for casetypes.

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

* Don't mutate `data` argument

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine 2019-07-13 10:17:00 +10:00 committed by Michael H
parent 687b88ca6f
commit e34eca557b

View File

@ -463,7 +463,9 @@ class CaseType:
CaseType
"""
return cls(name=name, **data, **kwargs)
data_copy = data.copy()
data_copy.pop(name, None)
return cls(name=name, **data_copy, **kwargs)
async def get_next_case_number(guild: discord.Guild) -> int: