aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2025-11-09 22:40:59 +0000
committerGravatar Joe Banks <[email protected]>2025-11-09 23:23:11 +0000
commit06446862fd7e70dd5efc39236b96dd3126799bd5 (patch)
treeec33e83a1746bca5f16271d79b8437de169dbfad
parentUse typed context object (diff)
SourceType command -> text_command
-rw-r--r--pydis_core/exts/source.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pydis_core/exts/source.py b/pydis_core/exts/source.py
index 2c6cf22e..bf87637e 100644
--- a/pydis_core/exts/source.py
+++ b/pydis_core/exts/source.py
@@ -33,7 +33,7 @@ class _SourceType(enum.StrEnum):
"""The types of source objects recognized by the source command."""
help_command = enum.auto()
- command = enum.auto()
+ text_command = enum.auto()
cog = enum.auto()
tag = enum.auto()
extension_not_loaded = enum.auto()
@@ -85,7 +85,7 @@ class SourceCode(commands.Cog, description="Displays information about the bot's
cmd = ctx.bot.get_command(argument)
if cmd:
- return cmd, _SourceType.command
+ return cmd, _SourceType.text_command
tags_cog = ctx.bot.get_cog("Tags")
show_tag = True
@@ -109,7 +109,7 @@ class SourceCode(commands.Cog, description="Displays information about the bot's
Raise BadArgument if `source_item` is a dynamically-created object (e.g. via internal eval).
"""
- if source_type == _SourceType.command:
+ if source_type == _SourceType.text_command:
source_item = inspect.unwrap(source_item.callback)
src = source_item.__code__
filename = src.co_filename
@@ -151,7 +151,7 @@ class SourceCode(commands.Cog, description="Displays information about the bot's
if source_type == _SourceType.help_command:
title = "Help Command"
description = source_object.__doc__.splitlines()[1]
- elif source_type == _SourceType.command:
+ elif source_type == _SourceType.text_command:
description = source_object.short_doc
title = f"Command: {source_object.qualified_name}"
elif source_type == _SourceType.tag: