Skip to content

Commit

Permalink
and... completed? i guess
Browse files Browse the repository at this point in the history
  • Loading branch information
fixator10 committed Aug 25, 2020
1 parent 3e0780a commit 963fd37
Show file tree
Hide file tree
Showing 12 changed files with 1,186 additions and 1,100 deletions.
6 changes: 5 additions & 1 deletion leveler/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from io import BytesIO
from logging import Logger
from re import Match
from typing import Optional
from typing import List, Optional

from aiohttp import ClientSession
from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorDatabase
Expand Down Expand Up @@ -126,6 +126,10 @@ async def _give_chat_credit(self, user, server):
async def _valid_image_url(self, url):
raise NotImplementedError

@abstractmethod
async def _auto_color(self, ctx, url: str, ranks) -> List[str]:
raise NotImplementedError


class CompositeMetaClass(type(commands.Cog), type(ABC)):
"""
Expand Down
11 changes: 10 additions & 1 deletion leveler/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@
from .database import DataBase
from .db_converters import DBConverters
from .lvladmin import LevelAdmin
from .lvlset import LevelSet
from .other import Other
from .profiles import Profiles
from .top import Top


class LevelerCommands(
Profiles, DataBase, Top, LevelAdmin, DBConverters, metaclass=CompositeMetaClass
Profiles,
DataBase,
Top,
LevelAdmin,
LevelSet,
DBConverters,
Other,
metaclass=CompositeMetaClass,
):
"""Class joining all command subclasses"""
7 changes: 5 additions & 2 deletions leveler/commands/lvladmin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
from leveler.abc import CompositeMetaClass

from .backgrounds import Backgrounds
from .badge import Badge
from .economy import Economy
from .roles import Roles
from .settings import Settings
from .users import Users


class LevelAdmin(Backgrounds, Economy, Roles, Settings, Users, metaclass=CompositeMetaClass):
"""Database converters commands"""
class LevelAdmin(
Backgrounds, Economy, Roles, Settings, Users, Badge, metaclass=CompositeMetaClass
):
"""Leveler administration commands"""
Loading

0 comments on commit 963fd37

Please sign in to comment.