blob: 0dd9605e8dcd06c04299c985018a70e43e13754c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
from abc import ABCMeta
from discord.ext.commands import CogMeta
from bot.utils.lock import LockGuard
from bot.utils.redis_cache import RedisCache
__all__ = ["CogABCMeta", "LockGuard", "RedisCache"]
class CogABCMeta(CogMeta, ABCMeta):
"""Metaclass for ABCs meant to be implemented as Cogs."""
pass
def pad_base64(data: str) -> str:
"""Return base64 `data` with padding characters to ensure its length is a multiple of 4."""
return data + "=" * (-len(data) % 4)
|