misc: added test to the get group and renamed it to url

This commit is contained in:
Seaswimmer 2023-07-16 12:52:46 -04:00
parent 99a6a0dfda
commit c674f15895
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -171,9 +171,11 @@ class Pterodactyl(commands.Cog):
message = await self.passed_info['interaction'].edit_original_response(content=f"Command cancelled.", view=None) message = await self.passed_info['interaction'].edit_original_response(content=f"Command cancelled.", view=None)
await message.delete(delay=3) await message.delete(delay=3)
@app_commands.command() get_group = app_commands.Group(name='get', description="Retrieves information from the Pterodactyl API.")
async def test(self, interaction: discord.Interaction, endpoint: str = None):
"""This does stuff!""" @get_group.command(name='url', description="Retrieves the URL for the specified endpoint.")
async def retrieve_url(self, interaction: discord.Interaction, endpoint: str = None):
"""Retrieves the URL for the specified endpoint."""
try: try:
if endpoint: if endpoint:
url = await self.get_url(interaction.guild, endpoint) url = await self.get_url(interaction.guild, endpoint)