# 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 json
import logging
import math
import os
import discord
from datetime import timezone, datetime
from dateutil import parser
from discord.ext.commands import has_permissions, BadArgument
from ._utils import *
from .general import blurple
from .. import db
        if header is not None:
            if len(header) > 256:  # message does not need a check as description max char is higher than max message length of 4000
                await ctx.send("```Warning! Header larger than max 256 characters, header has been truncated```")
        entry = ScheduledMessages(
            guild_id=ctx.guild.id,
            channel_id=channel.id,
            time=send_time,
            content=message,
            header=header[:256],
            requester_id=ctx.author.id,
            request_id=ctx.message.id
        )
        await entry.update_or_add()
        entries = await ScheduledMessages.get_by(request_id=entry.request_id)
        entry = entries[0]
        task = self.bot.loop.create_task(self.msg_timer(entry))
        self.timers[entry.request_id] = task
        await ctx.send(f"Scheduled message(ID: {entry.entry_id}) saved, and will be sent in {channel.mention} on"
                       f" {send_time.strftime('%B %d %H:%M%z %Y')}\nMessage preview:")
        await self.send_scheduled_msg(entry, channel_override=ctx.message.channel.id)

    add.example_usage = """
    `{prefix}schedulesend add #announcments "1/0/1970 0:00:00 GMT" Epoch -/- 00000`: Dozer will send a message on the unix epoch in #announcments
    """

    @schedulesend.command()
    @has_permissions(manage_messages=True)
    async def delete(self, ctx, entry_id: int):
        """Delete a scheduled message"""
        entries = await ScheduledMessages.get_by(entry_id=entry_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/management.py
import asyncio
import json
import logging
import math
import os
import discord
from datetime import timezone, datetime
from dateutil import parser
from discord.ext.commands import has_permissions, BadArgument
from ._utils import *
from .general import blurple
from .. import db

        if header is not None:
            if len(header) > 256:  # message does not need a check as description max char is higher than max message length of 4000
                await ctx.send("```Warning! Header larger than max 256 characters, header has been truncated```")
        entry = ScheduledMessages(
            guild_id=ctx.guild.id,
            channel_id=channel.id,
            time=send_time,
            content=message,
            header=header[:256],
            requester_id=ctx.author.id,
            request_id=ctx.message.id
        )
        await entry.update_or_add()
        entries = await ScheduledMessages.get_by(request_id=entry.request_id)
        entry = entries[0]
        task = self.bot.loop.create_task(self.msg_timer(entry))
        self.timers[entry.request_id] = task
        await ctx.send(f"Scheduled message(ID: {entry.entry_id}) saved, and will be sent in {channel.mention} on"
                       f" {send_time.strftime('%B %d %H:%M%z %Y')}\nMessage preview:")
        await self.send_scheduled_msg(entry, channel_override=ctx.message.channel.id)

    add.example_usage = """
    `{prefix}schedulesend add #announcments "1/0/1970 0:00:00 GMT" Epoch -/- 00000`: Dozer will send a message on the unix epoch in #announcments
    """

    @schedulesend.command()
    @has_permissions(manage_messages=True)
    async def delete(self, ctx, entry_id: int):
        """Delete a scheduled message"""
        entries = await ScheduledMessages.get_by(entry_id=entry_id)

        e = discord.Embed(color=blurple)