Skip to content

Commit

Permalink
Add command string to result of testing options
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanin committed Dec 30, 2024
1 parent 051f925 commit 5af05a7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/cogs/dev/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from discord import app_commands

from bot import Bot
from common.functions.text import options_to_string
from utils.checks import checks


Expand Down Expand Up @@ -182,5 +183,13 @@ async def test_options(
if attachment:
em.add_field(name="Attachment:", value=attachment.filename)

await interaction.followup.send(embed=em, file=discord.File(json_file, "data.json"))
parent_command = ""
parent = interaction.command.parent
while parent:
parent_command = f"{parent.name} {parent_command}"
parent = parent.parent
command = "/" + parent_command + interaction.command.name
options = options_to_string(interaction, code=True)
command += options
await interaction.followup.send(command, embed=em, file=discord.File(json_file, "data.json"))

0 comments on commit 5af05a7

Please sign in to comment.