mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
This shouldn't be possible normally, but we've have enough issues with it (#3318)
This commit is contained in:
parent
7352f76b87
commit
ed692bcaa5
@ -1,6 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import logging
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from typing import List, Union, Optional, cast, TYPE_CHECKING
|
from typing import List, Union, Optional, cast, TYPE_CHECKING
|
||||||
|
|
||||||
@ -21,6 +22,8 @@ from .generic_casetypes import all_generics
|
|||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from redbot.core.bot import Red
|
from redbot.core.bot import Red
|
||||||
|
|
||||||
|
log = logging.getLogger("red.core.modlog")
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"Case",
|
"Case",
|
||||||
"CaseType",
|
"CaseType",
|
||||||
@ -497,12 +500,15 @@ class CaseType:
|
|||||||
image: str,
|
image: str,
|
||||||
case_str: str,
|
case_str: str,
|
||||||
guild: Optional[discord.Guild] = None,
|
guild: Optional[discord.Guild] = None,
|
||||||
|
**kwargs,
|
||||||
):
|
):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.default_setting = default_setting
|
self.default_setting = default_setting
|
||||||
self.image = image
|
self.image = image
|
||||||
self.case_str = case_str
|
self.case_str = case_str
|
||||||
self.guild = guild
|
self.guild = guild
|
||||||
|
if kwargs:
|
||||||
|
log.warning("Got unexpected keys in case %s", ",".join(kwargs.keys()))
|
||||||
|
|
||||||
async def to_json(self):
|
async def to_json(self):
|
||||||
"""Transforms the case type into a dict and saves it"""
|
"""Transforms the case type into a dict and saves it"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user