# Path: dozer/cogs/general.py
# class General(Cog):
#     async def ping(self, ctx):
#     async def base_help(self, ctx, *target):
#     async def _help_all(self, ctx):
#     async def _help_command(self, ctx, command):
#     async def _help_cog(self, ctx, cog):
#     async def _show_help(self, ctx, start_page, title, description, footer, commands, **format_args):
#     async def nick(self, ctx, *, nicktochangeto):
#     async def invite(self, ctx):
#     async def configprefix(self, ctx, prefix: str):
# def setup(bot):


import asyncio
import datetime
import logging
import re
import time
import typing
import discord
from logging import getLogger
from typing import Union
from discord.ext import tasks
from discord.ext.commands import BadArgument, has_permissions, RoleConverter, guild_only
from ._utils import *
from .general import blurple
from .. import db

    @classmethod
    async def get_by(cls, **kwargs):
        results = await super().get_by(**kwargs)
        result_list = []
        for result in results:
            obj = MemberRole(member_role=result.get("member_role"), guild_id=result.get("guild_id"))
            result_list.append(obj)
        return result_list


class NewMemPurgeConfig(db.DatabaseTable):
    """Holds info on member purge routines"""
    __tablename__ = 'member_purge_configs'
    __uniques__ = 'guild_id'

    @classmethod
    async def initial_create(cls):
        """Create the table in the database"""
        async with db.Pool.acquire() as conn:
            await conn.execute(f"""
            CREATE TABLE {cls.__tablename__} (
            guild_id bigint PRIMARY KEY NOT NULL,
            member_role bigint not null,
            days int not null
            )""")

    def __init__(self, guild_id, member_role, days):
        super().__init__()
        self.guild_id = guild_id

# Path: dozer/cogs/general.py
# class General(Cog):
#     async def ping(self, ctx):
#     async def base_help(self, ctx, *target):
#     async def _help_all(self, ctx):
#     async def _help_command(self, ctx, command):
#     async def _help_cog(self, ctx, cog):
#     async def _show_help(self, ctx, start_page, title, description, footer, commands, **format_args):
#     async def nick(self, ctx, *, nicktochangeto):
#     async def invite(self, ctx):
#     async def configprefix(self, ctx, prefix: str):
# def setup(bot):


# Path: dozer/cogs/moderation.py
import asyncio
import datetime
import logging
import re
import time
import typing
import discord
from logging import getLogger
from typing import Union
from discord.ext import tasks
from discord.ext.commands import BadArgument, has_permissions, RoleConverter, guild_only
from ._utils import *
from .general import blurple
from .. import db


    @classmethod
    async def get_by(cls, **kwargs):
        results = await super().get_by(**kwargs)
        result_list = []
        for result in results:
            obj = MemberRole(member_role=result.get("member_role"), guild_id=result.get("guild_id"))
            result_list.append(obj)
        return result_list


class NewMemPurgeConfig(db.DatabaseTable):
    """Holds info on member purge routines"""
    __tablename__ = 'member_purge_configs'
    __uniques__ = 'guild_id'

    @classmethod
    async def initial_create(cls):
        """Create the table in the database"""
        async with db.Pool.acquire() as conn:
            await conn.execute(f"""
            CREATE TABLE {cls.__tablename__} (
            guild_id bigint PRIMARY KEY NOT NULL,
            member_role bigint not null,
            days int not null
            )""")

    def __init__(self, guild_id, member_role, days):
        super().__init__()
        self.guild_id = guild_id

        self.member_role = member_role