mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
* I know this needs a changelog entry and docs still * update tests for new behavior * update docs, filter; add changelog * Ready for review * stop fetching the same Audit logs when the bot is the mod * I forgot to press save * fix a comprehension * Fix AttributeError * And the other place that happens * timing fixes
27 lines
697 B
Python
27 lines
697 B
Python
from abc import ABC, abstractmethod
|
|
from typing import List, Tuple, Optional
|
|
|
|
import discord
|
|
from redbot.core import Config, commands
|
|
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
|
|
|
|
@staticmethod
|
|
@abstractmethod
|
|
async def _voice_perm_check(
|
|
ctx: commands.Context, user_voice_state: Optional[discord.VoiceState], **perms: bool
|
|
) -> bool:
|
|
raise NotImplementedError()
|