Skip to content

Commit b7d2150

Browse files
committed
SourceType command -> text_command
1 parent 16af9e7 commit b7d2150

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pydis_core/exts/source.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class _SourceType(enum.StrEnum):
3333
"""The types of source objects recognized by the source command."""
3434

3535
help_command = enum.auto()
36-
command = enum.auto()
36+
text_command = enum.auto()
3737
cog = enum.auto()
3838
tag = enum.auto()
3939
extension_not_loaded = enum.auto()
@@ -85,7 +85,7 @@ async def _get_source_object(ctx: commands.Context["Bot"], argument: str) -> tup
8585

8686
cmd = ctx.bot.get_command(argument)
8787
if cmd:
88-
return cmd, _SourceType.command
88+
return cmd, _SourceType.text_command
8989

9090
tags_cog = ctx.bot.get_cog("Tags")
9191
show_tag = True
@@ -109,7 +109,7 @@ def _get_source_link(self, source_item: object, source_type: _SourceType) -> tup
109109
110110
Raise BadArgument if `source_item` is a dynamically-created object (e.g. via internal eval).
111111
"""
112-
if source_type == _SourceType.command:
112+
if source_type == _SourceType.text_command:
113113
source_item = inspect.unwrap(source_item.callback)
114114
src = source_item.__code__
115115
filename = src.co_filename
@@ -151,7 +151,7 @@ async def _build_embed(self, source_object: object, source_type: _SourceType) ->
151151
if source_type == _SourceType.help_command:
152152
title = "Help Command"
153153
description = source_object.__doc__.splitlines()[1]
154-
elif source_type == _SourceType.command:
154+
elif source_type == _SourceType.text_command:
155155
description = source_object.short_doc
156156
title = f"Command: {source_object.qualified_name}"
157157
elif source_type == _SourceType.tag:

0 commit comments

Comments
 (0)