Python discord.Embed() Examples

The following are 30 code examples for showing how to use discord.Embed(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module discord , or try the search function .

Example 1
Project: cyberdisc-bot   Author: CyberDiscovery   File: maths.py    License: MIT License 28 votes vote down vote up
def challenge(self, ctx: Context, number: int = 1):
        """Show the provided challenge number."""
        challenge = await get_challenge(number)
        description = challenge["challenge"]
        if len(description) > 2048:
            description = description[:2045] + "..."
        embed = Embed(
            title=challenge["title"],
            colour=Colour(0xE5E242),
            url=f"https://www.kingsmathsschool.com/weekly-maths-challenge/{challenge['slug']}",
            description=description,
        )

        embed.set_image(url=challenge["image"])
        embed.set_thumbnail(
            url="https://pbs.twimg.com/profile_images/502115424121528320/hTQzj_-R.png"
        )
        embed.set_author(name="King's Maths School")
        embed.set_footer(
            text=f"Challenge Released: {challenge['published']} | Category: {challenge['category']}"
        )
        return await ctx.send(embed=embed) 
Example 2
Project: bot   Author: python-discord   File: off_topic_names.py    License: MIT License 10 votes vote down vote up
def search_command(self, ctx: Context, *, query: OffTopicName) -> None:
        """Search for an off-topic name."""
        result = await self.bot.api_client.get('bot/off-topic-channel-names')
        in_matches = {name for name in result if query in name}
        close_matches = difflib.get_close_matches(query, result, n=10, cutoff=0.70)
        lines = sorted(f"• {name}" for name in in_matches.union(close_matches))
        embed = Embed(
            title="Query results",
            colour=Colour.blue()
        )

        if lines:
            await LinePaginator.paginate(lines, ctx, embed, max_size=400, empty=False)
        else:
            embed.description = "Nothing found."
            await ctx.send(embed=embed) 
Example 3
Project: bot   Author: python-discord   File: watchchannel.py    License: MIT License 7 votes vote down vote up
def list_watched_users(self, ctx: Context, update_cache: bool = True) -> None:
        """
        Gives an overview of the watched user list for this channel.

        The optional kwarg `update_cache` specifies whether the cache should
        be refreshed by polling the API.
        """
        if update_cache:
            if not await self.fetch_user_cache():
                await ctx.send(f":x: Failed to update {self.__class__.__name__} user cache, serving from cache")
                update_cache = False

        lines = []
        for user_id, user_data in self.watched_users.items():
            inserted_at = user_data['inserted_at']
            time_delta = self._get_time_delta(inserted_at)
            lines.append(f"• <@{user_id}> (added {time_delta})")

        lines = lines or ("There's nothing here yet.",)
        embed = Embed(
            title=f"{self.__class__.__name__} watched users ({'updated' if update_cache else 'cached'})",
            color=Color.blue()
        )
        await LinePaginator.paginate(lines, ctx, embed, empty=False) 
Example 4
Project: bot   Author: python-discord   File: utils.py    License: MIT License 7 votes vote down vote up
def notify_pardon(
    user: UserObject,
    title: str,
    content: str,
    icon_url: str = Icons.user_verified
) -> bool:
    """DM a user about their pardoned infraction and return True if the DM is successful."""
    log.trace(f"Sending {user} a DM about their pardoned infraction.")

    embed = discord.Embed(
        description=content,
        colour=Colours.soft_green
    )

    embed.set_author(name=title, icon_url=icon_url)

    return await send_private_embed(user, embed) 
Example 5
Project: SpaceXLaunchBot   Author: r-spacex   File: discordclient.py    License: MIT License 6 votes vote down vote up
def send_all_subscribed(
        self, to_send: Union[str, discord.Embed], send_mentions: bool = False
    ) -> None:
        """Send a message to all subscribed channels.

        Args:
            to_send: A String or discord.Embed object.
            send_mentions: If True, get mentions from db and send as well.

        """
        channel_ids = self.ds.get_subbed_channels()
        guild_opts = self.ds.get_all_guilds_options()
        invalid_ids = set()

        for channel_id in channel_ids:
            channel = self.get_channel(channel_id)

            if channel is None:
                invalid_ids.add(channel_id)
                continue

            await self._send_s(channel, to_send)

            if send_mentions:
                if (opts := guild_opts.get(channel.guild.id)) is not None:
                    if (mentions := opts.get("mentions")) is not None:
                        await self._send_s(channel, mentions)

        # Remove any channels from db that are picked up as invalid 
Example 6
Project: SpaceXLaunchBot   Author: r-spacex   File: embeds.py    License: MIT License 6 votes vote down vote up
def create_launching_soon_embed(launch_info: Dict) -> discord.Embed:
    """Create a "launching soon" style embed from a dict of launch information.

    Args:
        launch_info: A dictionary of launch information from apis.spacex.

    Returns:
        A Discord.Embed object.

    """
    embed_desc = ""
    utc_launch_date = utc_from_ts(launch_info["launch_date_unix"])

    if (video_url := launch_info["links"]["video_link"]) is not None:
        embed_desc += md_link("Livestream", video_url) + "\n" 
Example 7
Project: SpaceXLaunchBot   Author: r-spacex   File: test_embeds.py    License: MIT License 6 votes vote down vote up
def test_embed_is_valid():
    assert embeds.embed_is_valid(Embed()) is True
    assert embeds.embed_is_valid(Embed(title="a" * 256)) is True
    assert embeds.embed_is_valid(Embed(description="a" * 2048)) is True
    assert (
        embeds.embed_is_valid(embeds.EmbedWithFields(fields=[["a", "a"]] * 25)) is True
    ) 
Example 8
Project: SpaceXLaunchBot   Author: r-spacex   File: test_embeds.py    License: MIT License 6 votes vote down vote up
def test_embed_is_invalid():
    assert embeds.embed_is_valid(Embed(title="a" * 257)) is False
    assert embeds.embed_is_valid(Embed(description="a" * 2049)) is False
    assert (
        embeds.embed_is_valid(embeds.EmbedWithFields(fields=[["a", "a"]] * 26)) is False
    ) 
Example 9
Project: bot   Author: python-discord   File: management.py    License: MIT License 6 votes vote down vote up
def send_infraction_list(
        self,
        ctx: Context,
        embed: discord.Embed,
        infractions: t.Iterable[utils.Infraction]
    ) -> None:
        """Send a paginated embed of infractions for the specified user."""
        if not infractions:
            await ctx.send(":warning: No infractions could be found for that query.")
            return

        lines = tuple(
            self.infraction_to_string(infraction)
            for infraction in infractions
        )

        await LinePaginator.paginate(
            lines,
            ctx=ctx,
            embed=embed,
            empty=True,
            max_lines=3,
            max_size=1000
        ) 
Example 10
Project: avrae   Author: avrae   File: conftest.py    License: GNU General Public License v3.0 6 votes vote down vote up
def receive_message(self, content: str = None, *, regex: bool = True, dm=False, embed: Embed = None):
        """
        Assert that the bot sends a message, and that it is the message we expect.
        If a regex is passed, this method returns the match object against the content.
        :param content The text or regex to match the message content against
        :param regex Whether to interpret content checking fields as a regex
        :param dm Whether it was a Direct Message that was received or not
        :param embed An embed to check against
        """
        request = await self.get_request()
        channel = TEST_DMCHANNEL_ID if dm else TEST_CHANNEL_ID

        assert request.method == "POST"
        assert request.url.endswith(f"/channels/{channel}/messages")

        return message_content_check(request, content, regex=regex, embed=embed) 
Example 11
Project: avrae   Author: avrae   File: conftest.py    License: GNU General Public License v3.0 6 votes vote down vote up
def receive_edit(self, content: str = None, *, regex: bool = True, dm=False, embed: Embed = None):
        """
        Assert that the bot edits a message, and that it is the message we expect.
        If a regex is passed, this method returns the match object against the content.
        :param content The text or regex to match the message content against
        :param regex Whether to interpret content checking fields as a regex
        :param dm Whether it was a Direct Message that was edited or not
        :param embed An embed to check against
        """
        request = await self.get_request()
        channel = TEST_DMCHANNEL_ID if dm else TEST_CHANNEL_ID

        assert request.method == "PATCH"
        assert request.url.endswith(f"/channels/{channel}/messages/{MESSAGE_ID}")

        return message_content_check(request, content, regex=regex, embed=embed) 
Example 12
Project: bot   Author: python-discord   File: python_news.py    License: MIT License 5 votes vote down vote up
def send_webhook(self,
                           title: str,
                           description: str,
                           timestamp: datetime,
                           url: str,
                           webhook_profile_name: str,
                           footer: str,
                           author: t.Optional[str] = None,
                           author_url: t.Optional[str] = None,
                           ) -> discord.Message:
        """Send webhook entry and return sent message."""
        embed = discord.Embed(
            title=title,
            description=description,
            timestamp=timestamp,
            url=url,
            colour=constants.Colours.soft_green
        )
        if author and author_url:
            embed.set_author(
                name=author,
                url=author_url
            )
        embed.set_footer(text=footer, icon_url=AVATAR_URL)

        return await self.webhook.send(
            embed=embed,
            username=sub_clyde(webhook_profile_name),
            avatar_url=AVATAR_URL,
            wait=True
        ) 
Example 13
Project: bot   Author: python-discord   File: antimalware.py    License: MIT License 5 votes vote down vote up
def on_message(self, message: Message) -> None:
        """Identify messages with prohibited attachments."""
        # Return when message don't have attachment and don't moderate DMs
        if not message.attachments or not message.guild:
            return

        # Check if user is staff, if is, return
        # Since we only care that roles exist to iterate over, check for the attr rather than a User/Member instance
        if hasattr(message.author, "roles") and any(role.id in STAFF_ROLES for role in message.author.roles):
            return

        embed = Embed()
        extensions_blocked = self.get_disallowed_extensions(message)
        blocked_extensions_str = ', '.join(extensions_blocked)
        if ".py" in extensions_blocked:
            # Short-circuit on *.py files to provide a pastebin link
            embed.description = PY_EMBED_DESCRIPTION
        elif ".txt" in extensions_blocked:
            # Work around Discord AutoConversion of messages longer than 2000 chars to .txt
            cmd_channel = self.bot.get_channel(Channels.bot_commands)
            embed.description = TXT_EMBED_DESCRIPTION.format(cmd_channel_mention=cmd_channel.mention)
        elif extensions_blocked:
            meta_channel = self.bot.get_channel(Channels.meta)
            embed.description = DISALLOWED_EMBED_DESCRIPTION.format(
                blocked_extensions_str=blocked_extensions_str,
                meta_channel_mention=meta_channel.mention,
            )

        if embed.description:
            log.info(
                f"User '{message.author}' ({message.author.id}) uploaded blacklisted file(s): {blocked_extensions_str}",
                extra={"attachment_list": [attachment.filename for attachment in message.attachments]}
            )

            await message.channel.send(f"Hey {message.author.mention}!", embed=embed)

            # Delete the offending message:
            try:
                await message.delete()
            except NotFound:
                log.info(f"Tried to delete message `{message.id}`, but message could not be found.") 
Example 14
Project: bot   Author: python-discord   File: reddit.py    License: MIT License 5 votes vote down vote up
def subreddits_command(self, ctx: Context) -> None:
        """Send a paginated embed of all the subreddits we're relaying."""
        embed = Embed()
        embed.title = "Relayed subreddits."
        embed.colour = Colour.blurple()

        await LinePaginator.paginate(
            RedditConfig.subreddits,
            ctx, embed,
            footer_text="Use the reddit commands along with these to view their posts.",
            empty=False,
            max_lines=15
        ) 
Example 15
Project: bot   Author: python-discord   File: help_channels.py    License: MIT License 5 votes vote down vote up
def move_to_dormant(self, channel: discord.TextChannel, caller: str) -> None:
        """
        Make the `channel` dormant.

        A caller argument is provided for metrics.
        """
        log.info(f"Moving #{channel} ({channel.id}) to the Dormant category.")

        await self.move_to_bottom_position(
            channel=channel,
            category_id=constants.Categories.help_dormant,
        )

        self.bot.stats.incr(f"help.dormant_calls.{caller}")

        in_use_time = await self.get_in_use_time(channel.id)
        if in_use_time:
            self.bot.stats.timing("help.in_use_time", in_use_time)

        unanswered = await self.unanswered.get(channel.id)
        if unanswered:
            self.bot.stats.incr("help.sessions.unanswered")
        elif unanswered is not None:
            self.bot.stats.incr("help.sessions.answered")

        log.trace(f"Position of #{channel} ({channel.id}) is actually {channel.position}.")
        log.trace(f"Sending dormant message for #{channel} ({channel.id}).")
        embed = discord.Embed(description=DORMANT_MSG)
        await channel.send(embed=embed)

        log.trace(f"Pushing #{channel} ({channel.id}) into the channel queue.")
        self.channel_queue.put_nowait(channel)
        self.report_stats() 
Example 16
Project: bot   Author: python-discord   File: duck_pond.py    License: MIT License 5 votes vote down vote up
def send_webhook(
        self,
        content: Optional[str] = None,
        username: Optional[str] = None,
        avatar_url: Optional[str] = None,
        embed: Optional[Embed] = None,
    ) -> None:
        """Send a webhook to the duck_pond channel."""
        try:
            await self.webhook.send(
                content=content,
                username=sub_clyde(username),
                avatar_url=avatar_url,
                embed=embed
            )
        except discord.HTTPException:
            log.exception("Failed to send a message to the Duck Pool webhook") 
Example 17
Project: bot   Author: python-discord   File: duck_pond.py    License: MIT License 5 votes vote down vote up
def relay_message(self, message: Message) -> None:
        """Relays the message's content and attachments to the duck pond channel."""
        clean_content = message.clean_content

        if clean_content:
            await self.send_webhook(
                content=message.clean_content,
                username=message.author.display_name,
                avatar_url=message.author.avatar_url
            )

        if message.attachments:
            try:
                await send_attachments(message, self.webhook)
            except (errors.Forbidden, errors.NotFound):
                e = Embed(
                    description=":x: **This message contained an attachment, but it could not be retrieved**",
                    color=Color.red()
                )
                await self.send_webhook(
                    embed=e,
                    username=message.author.display_name,
                    avatar_url=message.author.avatar_url
                )
            except discord.HTTPException:
                log.exception("Failed to send an attachment to the webhook")

        await message.add_reaction("✅") 
Example 18
Project: bot   Author: python-discord   File: utils.py    License: MIT License 5 votes vote down vote up
def charinfo(self, ctx: Context, *, characters: str) -> None:
        """Shows you information on up to 25 unicode characters."""
        match = re.match(r"<(a?):(\w+):(\d+)>", characters)
        if match:
            embed = Embed(
                title="Non-Character Detected",
                description=(
                    "Only unicode characters can be processed, but a custom Discord emoji "
                    "was found. Please remove it and try again."
                )
            )
            embed.colour = Colour.red()
            await ctx.send(embed=embed)
            return

        if len(characters) > 25:
            embed = Embed(title=f"Too many characters ({len(characters)}/25)")
            embed.colour = Colour.red()
            await ctx.send(embed=embed)
            return

        def get_info(char: str) -> Tuple[str, str]:
            digit = f"{ord(char):x}"
            if len(digit) <= 4:
                u_code = f"\\u{digit:>04}"
            else:
                u_code = f"\\U{digit:>08}"
            url = f"https://www.compart.com/en/unicode/U+{digit:>04}"
            name = f"[{unicodedata.name(char, '')}]({url})"
            info = f"`{u_code.ljust(10)}`: {name} - {utils.escape_markdown(char)}"
            return info, u_code

        charlist, rawlist = zip(*(get_info(c) for c in characters))

        embed = Embed(description="\n".join(charlist))
        embed.set_author(name="Character Info")

        if len(characters) > 1:
            embed.add_field(name='Raw', value=f"`{''.join(rawlist)}`", inline=False)

        await ctx.send(embed=embed) 
Example 19
Project: bot   Author: python-discord   File: utils.py    License: MIT License 5 votes vote down vote up
def send_pep_zero(self, ctx: Context) -> None:
        """Send information about PEP 0."""
        pep_embed = Embed(
            title="**PEP 0 - Index of Python Enhancement Proposals (PEPs)**",
            description="[Link](https://www.python.org/dev/peps/)"
        )
        pep_embed.set_thumbnail(url=ICON_URL)
        pep_embed.add_field(name="Status", value="Active")
        pep_embed.add_field(name="Created", value="13-Jul-2000")
        pep_embed.add_field(name="Type", value="Informational")

        await ctx.send(embed=pep_embed) 
Example 20
Project: bot   Author: python-discord   File: help.py    License: MIT License 5 votes vote down vote up
def send_error_message(self, error: HelpQueryNotFound) -> None:
        """Send the error message to the channel."""
        embed = Embed(colour=Colour.red(), title=str(error))

        if getattr(error, "possible_matches", None):
            matches = "\n".join(f"`{match}`" for match in error.possible_matches)
            embed.description = f"**Did you mean:**\n{matches}"

        await self.context.send(embed=embed) 
Example 21
Project: bot   Author: python-discord   File: help.py    License: MIT License 5 votes vote down vote up
def command_formatting(self, command: Command) -> Embed:
        """
        Takes a command and turns it into an embed.

        It will add an author, command signature + help, aliases and a note if the user can't run the command.
        """
        embed = Embed()
        embed.set_author(name="Command Help", icon_url=constants.Icons.questionmark)

        parent = command.full_parent_name

        name = str(command) if not parent else f"{parent} {command.name}"
        command_details = f"**```{PREFIX}{name} {command.signature}```**\n"

        # show command aliases
        aliases = ", ".join(f"`{alias}`" if not parent else f"`{parent} {alias}`" for alias in command.aliases)
        if aliases:
            command_details += f"**Can also use:** {aliases}\n\n"

        # check if the user is allowed to run this command
        if not await command.can_run(self.context):
            command_details += "***You cannot run this command.***\n\n"

        command_details += f"*{command.help or 'No details provided.'}*\n"
        embed.description = command_details

        return embed 
Example 22
Project: bot   Author: python-discord   File: help.py    License: MIT License 5 votes vote down vote up
def send_category_help(self, category: Category) -> None:
        """
        Sends help for a bot category.

        This sends a brief help for all commands in all cogs registered to the category.
        """
        embed = Embed()
        embed.set_author(name="Command Help", icon_url=constants.Icons.questionmark)

        all_commands = []
        for cog in category.cogs:
            all_commands.extend(cog.get_commands())

        filtered_commands = await self.filter_commands(all_commands, sort=True)

        command_detail_lines = self.get_commands_brief_details(filtered_commands, return_as_list=True)
        description = f"**{category.name}**\n*{category.description}*"

        if command_detail_lines:
            description += "\n\n**Commands:**"

        await LinePaginator.paginate(
            command_detail_lines,
            self.context,
            embed,
            prefix=description,
            max_lines=COMMANDS_PER_PAGE,
            max_size=2000,
        ) 
Example 23
Project: bot   Author: python-discord   File: extensions.py    License: MIT License 5 votes vote down vote up
def list_command(self, ctx: Context) -> None:
        """
        Get a list of all extensions, including their loaded status.

        Grey indicates that the extension is unloaded.
        Green indicates that the extension is currently loaded.
        """
        embed = Embed()
        lines = []

        embed.colour = Colour.blurple()
        embed.set_author(
            name="Extensions List",
            url=URLs.github_bot_repo,
            icon_url=URLs.bot_avatar
        )

        for ext in sorted(list(EXTENSIONS)):
            if ext in self.bot.extensions:
                status = Emojis.status_online
            else:
                status = Emojis.status_offline

            ext = ext.rsplit(".", 1)[1]
            lines.append(f"{status}  {ext}")

        log.debug(f"{ctx.author} requested a list of all cogs. Returning a paginated list.")
        await LinePaginator.paginate(lines, ctx, embed, max_size=300, empty=False) 
Example 24
Project: bot   Author: python-discord   File: reminders.py    License: MIT License 5 votes vote down vote up
def send_reminder(self, reminder: dict, late: relativedelta = None) -> None:
        """Send the reminder."""
        is_valid, user, channel = self.ensure_valid_reminder(reminder)
        if not is_valid:
            return

        embed = discord.Embed()
        embed.colour = discord.Colour.blurple()
        embed.set_author(
            icon_url=Icons.remind_blurple,
            name="It has arrived!"
        )

        embed.description = f"Here's your reminder: `{reminder['content']}`."

        if reminder.get("jump_url"):  # keep backward compatibility
            embed.description += f"\n[Jump back to when you created the reminder]({reminder['jump_url']})"

        if late:
            embed.colour = discord.Colour.red()
            embed.set_author(
                icon_url=Icons.remind_red,
                name=f"Sorry it arrived {humanize_delta(late, max_units=2)} late!"
            )

        await channel.send(
            content=user.mention,
            embed=embed
        )
        await self._delete_reminder(reminder["id"]) 
Example 25
Project: bot   Author: python-discord   File: off_topic_names.py    License: MIT License 5 votes vote down vote up
def list_command(self, ctx: Context) -> None:
        """
        Lists all currently known off-topic channel names in a paginator.

        Restricted to Moderator and above to not spoil the surprise.
        """
        result = await self.bot.api_client.get('bot/off-topic-channel-names')
        lines = sorted(f"• {name}" for name in result)
        embed = Embed(
            title=f"Known off-topic names (`{len(result)}` total)",
            colour=Colour.blue()
        )
        if result:
            await LinePaginator.paginate(lines, ctx, embed, max_size=400, empty=False)
        else:
            embed.description = "Hmmm, seems like there's nothing here yet."
            await ctx.send(embed=embed) 
Example 26
Project: bot   Author: python-discord   File: bot.py    License: MIT License 5 votes vote down vote up
def about_command(self, ctx: Context) -> None:
        """Get information about the bot."""
        embed = Embed(
            description="A utility bot designed just for the Python server! Try `!help` for more info.",
            url="https://github.com/python-discord/bot"
        )

        embed.add_field(name="Total Users", value=str(len(self.bot.get_guild(Guild.id).members)))
        embed.set_author(
            name="Python Bot",
            url="https://github.com/python-discord/bot",
            icon_url=URLs.bot_avatar
        )

        await ctx.send(embed=embed) 
Example 27
Project: bot   Author: python-discord   File: bot.py    License: MIT License 5 votes vote down vote up
def embed_command(self, ctx: Context, *, text: str) -> None:
        """Send the input within an embed to the current channel."""
        embed = Embed(description=text)
        await ctx.send(embed=embed) 
Example 28
Project: bot   Author: python-discord   File: defcon.py    License: MIT License 5 votes vote down vote up
def status_command(self, ctx: Context) -> None:
        """Check the current status of DEFCON mode."""
        embed = Embed(
            colour=Colour.blurple(), title="DEFCON Status",
            description=f"**Enabled:** {self.enabled}\n"
                        f"**Days:** {self.days.days}"
        )

        await ctx.send(embed=embed) 
Example 29
Project: bot   Author: python-discord   File: watchchannel.py    License: MIT License 5 votes vote down vote up
def send_header(self, msg: Message) -> None:
        """Sends a header embed with information about the relayed messages to the watch channel."""
        user_id = msg.author.id

        guild = self.bot.get_guild(GuildConfig.id)
        actor = guild.get_member(self.watched_users[user_id]['actor'])
        actor = actor.display_name if actor else self.watched_users[user_id]['actor']

        inserted_at = self.watched_users[user_id]['inserted_at']
        time_delta = self._get_time_delta(inserted_at)

        reason = self.watched_users[user_id]['reason']

        if isinstance(msg.channel, DMChannel):
            # If a watched user DMs the bot there won't be a channel name or jump URL
            # This could technically include a GroupChannel but bot's can't be in those
            message_jump = "via DM"
        else:
            message_jump = f"in [#{msg.channel.name}]({msg.jump_url})"

        footer = f"Added {time_delta} by {actor} | Reason: {reason}"
        embed = Embed(description=f"{msg.author.mention} {message_jump}")
        embed.set_footer(text=textwrap.shorten(footer, width=128, placeholder="..."))

        await self.webhook_send(embed=embed, username=msg.author.display_name, avatar_url=msg.author.avatar_url) 
Example 30
Project: bot   Author: python-discord   File: alias.py    License: MIT License 5 votes vote down vote up
def aliases_command(self, ctx: Context) -> None:
        """Show configured aliases on the bot."""
        embed = Embed(
            title='Configured aliases',
            colour=Colour.blue()
        )
        await LinePaginator.paginate(
            (
                f"• `{ctx.prefix}{value.name}` "
                f"=> `{ctx.prefix}{name[:-len('_alias')].replace('_', ' ')}`"
                for name, value in inspect.getmembers(self)
                if isinstance(value, Command) and name.endswith('_alias')
            ),
            ctx, embed, empty=False, max_lines=20
        )