mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
* Dependency update discord.py==1.0.1 websockets<7 [style] black==19.3b0 [Docs] jinja==2.10.1 urllib3==1.24.2 Changes related to breaking changes from discord.py have also been made to match As of this commit, help formatter is back to discord.py's default
34 lines
918 B
Python
34 lines
918 B
Python
from abc import ABC, abstractmethod
|
|
from typing import List, Tuple
|
|
|
|
import discord
|
|
from redbot.core import Config
|
|
from redbot.core.bot import Red
|
|
|
|
|
|
class MixinMeta(ABC):
|
|
"""
|
|
Base class for well behaved type hint detection with composite class.
|
|
|
|
Basically, to keep developers sane when not all attributes are defined in each mixin.
|
|
"""
|
|
|
|
def __init__(self, *_args):
|
|
self.settings: Config
|
|
self.bot: Red
|
|
self.cache: dict
|
|
self.ban_queue: List[Tuple[int, int]]
|
|
self.unban_queue: List[Tuple[int, int]]
|
|
|
|
@classmethod
|
|
@abstractmethod
|
|
async def get_audit_entry_info(
|
|
cls, guild: discord.Guild, action: discord.AuditLogAction, target
|
|
):
|
|
raise NotImplementedError()
|
|
|
|
@staticmethod
|
|
@abstractmethod
|
|
async def get_audit_log_entry(guild: discord.Guild, action: discord.AuditLogAction, target):
|
|
raise NotImplementedError()
|