# Path: dozer/utils.py
# def oauth_url(client_id, permissions=None, guild=None, redirect_uri=None):
#     """A helper function that returns the OAuth2 URL for inviting the bot
#     into guilds.
# 
#     Parameters
#     -----------
#     client_id: :class:`str`
#         The client ID for your bot.
#     permissions: :class:`~discord.Permissions`
#         The permissions you're requesting. If not given then you won't be requesting any
#         permissions.
#     guild: :class:`~discord.Guild`
#         The guild to pre-select in the authorization screen, if available.
#     redirect_uri: :class:`str`
#         An optional valid redirect URI.
# 
#     Returns
#     --------
#     :class:`str`
#         The OAuth2 URL for inviting the bot into guilds.
#     """
#     url = 'https://discord.com/oauth2/authorize?client_id={}&scope=bot%20applications.commands'.format(client_id)
#     if permissions is not None:
#         url = url + '&permissions=' + str(permissions.value)
#     if guild is not None:
#         url = url + "&guild_id=" + str(guild.id)
#     if redirect_uri is not None:
#         url = url + "&response_type=code&" + urlencode({'redirect_uri': redirect_uri})
#     return url


import inspect
import discord
from discord.ext.commands import BadArgument, cooldown, BucketType, Group, has_permissions, NotOwner, guild_only
from ._utils import *
from ..utils import oauth_url
            if target_name in ctx.bot.cogs:
                await self._help_cog(ctx, ctx.bot.cogs[target_name])
            else:
                command = ctx.bot.get_command(target_name)
                if command is None:
                    raise BadArgument('that command/cog does not exist!')
                else:
                    await self._help_command(ctx, command)
        else:  # Command with subcommand
            command = ctx.bot.get_command(' '.join(target))
            if command is None:
                raise BadArgument('that command does not exist!')
            else:
                await self._help_command(ctx, command)

    base_help.example_usage = """
    `{prefix}help` - General help message
    `{prefix}help help` - Help about the help command
    `{prefix}help General` - Help about the General category
    """

    async def _help_all(self, ctx):
        """Gets the help message for all commands."""
        info = discord.Embed(title='Dozer: Info', description='A guild management bot for FIRST Discord servers',
                             color=discord.Color.blue())
        info.set_thumbnail(url=self.bot.user.avatar_url)
        info.add_field(name='About',
                       value="Dozer: A collaborative bot for FIRST Discord servers, developed by the FRC Discord Server Development Team")
        info.add_field(name='About `{}{}`'.format(ctx.prefix, ctx.invoked_with), value=inspect.cleandoc("""
        This command can show info for all commands, a specific command, or a category of commands.

# Path: dozer/utils.py
# def oauth_url(client_id, permissions=None, guild=None, redirect_uri=None):
#     """A helper function that returns the OAuth2 URL for inviting the bot
#     into guilds.
# 
#     Parameters
#     -----------
#     client_id: :class:`str`
#         The client ID for your bot.
#     permissions: :class:`~discord.Permissions`
#         The permissions you're requesting. If not given then you won't be requesting any
#         permissions.
#     guild: :class:`~discord.Guild`
#         The guild to pre-select in the authorization screen, if available.
#     redirect_uri: :class:`str`
#         An optional valid redirect URI.
# 
#     Returns
#     --------
#     :class:`str`
#         The OAuth2 URL for inviting the bot into guilds.
#     """
#     url = 'https://discord.com/oauth2/authorize?client_id={}&scope=bot%20applications.commands'.format(client_id)
#     if permissions is not None:
#         url = url + '&permissions=' + str(permissions.value)
#     if guild is not None:
#         url = url + "&guild_id=" + str(guild.id)
#     if redirect_uri is not None:
#         url = url + "&response_type=code&" + urlencode({'redirect_uri': redirect_uri})
#     return url


# Path: dozer/cogs/general.py
import inspect
import discord
from discord.ext.commands import BadArgument, cooldown, BucketType, Group, has_permissions, NotOwner, guild_only
from ._utils import *
from ..utils import oauth_url

            if target_name in ctx.bot.cogs:
                await self._help_cog(ctx, ctx.bot.cogs[target_name])
            else:
                command = ctx.bot.get_command(target_name)
                if command is None:
                    raise BadArgument('that command/cog does not exist!')
                else:
                    await self._help_command(ctx, command)
        else:  # Command with subcommand
            command = ctx.bot.get_command(' '.join(target))
            if command is None:
                raise BadArgument('that command does not exist!')
            else:
                await self._help_command(ctx, command)

    base_help.example_usage = """
    `{prefix}help` - General help message
    `{prefix}help help` - Help about the help command
    `{prefix}help General` - Help about the General category
    """

    async def _help_all(self, ctx):
        """Gets the help message for all commands."""
        info = discord.Embed(title='Dozer: Info', description='A guild management bot for FIRST Discord servers',
                             color=discord.Color.blue())
        info.set_thumbnail(url=self.bot.user.avatar_url)
        info.add_field(name='About',
                       value="Dozer: A collaborative bot for FIRST Discord servers, developed by the FRC Discord Server Development Team")
        info.add_field(name='About `{}{}`'.format(ctx.prefix, ctx.invoked_with), value=inspect.cleandoc("""
        This command can show info for all commands, a specific command, or a category of commands.

        Use `{0}{1} {1}` for more information.