mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
[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:
parent
687b88ca6f
commit
e34eca557b
@ -463,7 +463,9 @@ class CaseType:
|
|||||||
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:
|
async def get_next_case_number(guild: discord.Guild) -> int:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user