# 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 random
import discord
from asyncio import sleep
from discord.ext.commands import cooldown, BucketType, guild_only, BadArgument, MissingPermissions
from discord_slash import cog_ext, SlashContext
from ._utils import *
from .general import blurple
                                                      f"\n{ctx.author.mention} now is at "
                                                      f"level {levels.level_for_total_xp(author_levels.total_xp)} ({author_levels.total_xp} XP) "
                                                      f"\n{opponent.mention} now is at "
                                                      f"level {levels.level_for_total_xp(opponent_levels.total_xp)} ({opponent_levels.total_xp} XP)")

                levels.sync_member(ctx.guild.id, ctx.author.id)
                levels.sync_member(ctx.guild.id, opponent.id)

            elif emoji == "❌":
                try:
                    await msg.clear_reactions()
                except discord.Forbidden:
                    pass
                embed.add_field(name="Results", value=f"{opponent.mention} declined the fight, fight canceled")
                embed.set_footer(text="")
                embed.colour = 0xff0000

        except asyncio.TimeoutError:
            try:
                await msg.clear_reactions()
            except discord.Forbidden:
                pass
            embed.add_field(name="Results", value=f"{opponent.mention} failed to accept in time, fight canceled")
            embed.set_footer(text="")
            embed.colour = 0xff0000

        await msg.edit(content=None, embed=embed)

    fight.example_usage = """
        `{prefix}fight @user2#2322 - Initiates a fight with @user2#2322

# 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/fun.py
import asyncio
import random
import discord
from asyncio import sleep
from discord.ext.commands import cooldown, BucketType, guild_only, BadArgument, MissingPermissions
from discord_slash import cog_ext, SlashContext
from ._utils import *
from .general import blurple

                                                      f"\n{ctx.author.mention} now is at "
                                                      f"level {levels.level_for_total_xp(author_levels.total_xp)} ({author_levels.total_xp} XP) "
                                                      f"\n{opponent.mention} now is at "
                                                      f"level {levels.level_for_total_xp(opponent_levels.total_xp)} ({opponent_levels.total_xp} XP)")

                levels.sync_member(ctx.guild.id, ctx.author.id)
                levels.sync_member(ctx.guild.id, opponent.id)

            elif emoji == "❌":
                try:
                    await msg.clear_reactions()
                except discord.Forbidden:
                    pass
                embed.add_field(name="Results", value=f"{opponent.mention} declined the fight, fight canceled")
                embed.set_footer(text="")
                embed.colour = 0xff0000

        except asyncio.TimeoutError:
            try:
                await msg.clear_reactions()
            except discord.Forbidden:
                pass
            embed.add_field(name="Results", value=f"{opponent.mention} failed to accept in time, fight canceled")
            embed.set_footer(text="")
            embed.colour = 0xff0000

        await msg.edit(content=None, embed=embed)

    fight.example_usage = """
        `{prefix}fight @user2#2322 - Initiates a fight with @user2#2322

         {prefix}fight @Snowplow#5196 670 - Initiates a fight with @Snowplow#5196 with a wager of 670xp`