mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -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
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from typing import List, Union, Optional, cast, TYPE_CHECKING
|
||||
|
||||
@ -21,6 +22,8 @@ from .generic_casetypes import all_generics
|
||||
if TYPE_CHECKING:
|
||||
from redbot.core.bot import Red
|
||||
|
||||
log = logging.getLogger("red.core.modlog")
|
||||
|
||||
__all__ = [
|
||||
"Case",
|
||||
"CaseType",
|
||||
@ -497,12 +500,15 @@ class CaseType:
|
||||
image: str,
|
||||
case_str: str,
|
||||
guild: Optional[discord.Guild] = None,
|
||||
**kwargs,
|
||||
):
|
||||
self.name = name
|
||||
self.default_setting = default_setting
|
||||
self.image = image
|
||||
self.case_str = case_str
|
||||
self.guild = guild
|
||||
if kwargs:
|
||||
log.warning("Got unexpected keys in case %s", ",".join(kwargs.keys()))
|
||||
|
||||
async def to_json(self):
|
||||
"""Transforms the case type into a dict and saves it"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user