feat(aurora): updated phx-class-registry to ^5.0.0 and fixed some typos
This commit is contained in:
parent
405729f37d
commit
97406e7bac
5 changed files with 694 additions and 647 deletions
|
@ -1,14 +1,15 @@
|
|||
from abc import abstractmethod
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any, Dict, Tuple
|
||||
|
||||
from class_registry import AutoRegister, ClassRegistry
|
||||
from class_registry import ClassRegistry
|
||||
from class_registry.base import AutoRegister
|
||||
from discord import Interaction, Member, User
|
||||
from discord.abc import Messageable
|
||||
from redbot.core import commands
|
||||
|
||||
type_registry: Dict['str', 'Type'] = ClassRegistry(attr_name='key', unique=True)
|
||||
|
||||
class Type(metaclass=AutoRegister(type_registry)):
|
||||
class Type(AutoRegister(type_registry), ABC):
|
||||
"""This is a base class for moderation types.
|
||||
|
||||
Attributes:
|
||||
|
@ -16,7 +17,7 @@ class Type(metaclass=AutoRegister(type_registry)):
|
|||
string (str): The string to display for this type.
|
||||
verb (str): The verb to use for this type.
|
||||
embed_desc (str): The string to use for embed descriptions.
|
||||
channel (bool): Whether this type targets channels or users. If this is `true` in a subclass, its overriden handler methods should be typed with `discord.abc.Messageable` instead of `discord.Member | discord.User`.
|
||||
channel (bool): Whether this type targets channels or users. If this is `true` in a subclass, its overridden handler methods should be typed with `discord.abc.Messageable` instead of `discord.Member | discord.User`.
|
||||
removes_from_guild (bool): Whether this type's handler removes the target from the guild, or if the moderation is expected to occur whenever the user is not in the guild. This does not actually remove the target from the guild, the handler method is responsible for that.
|
||||
|
||||
Properties:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue