fix(pterodactyl): type hints

This commit is contained in:
Seaswimmer 2024-03-05 02:24:20 -05:00
parent 80cb729e72
commit 52be531807
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -115,7 +115,7 @@ class Pterodactyl(commands.Cog):
"""Send power actions to the server."""
@pterodactyl_power.command(name = "start")
async def pterodactyl_power_start(self, ctx: commands.Context) -> None:
async def pterodactyl_power_start(self, ctx: commands.Context) -> Optional[discord.Message]:
"""Start the server."""
current_status = await config.current_status()
if current_status == "running":
@ -133,7 +133,7 @@ class Pterodactyl(commands.Cog):
await message.edit(content="Cancelled.", view=None)
@pterodactyl_power.command(name = "stop")
async def pterodactyl_power_stop(self, ctx: commands.Context) -> None:
async def pterodactyl_power_stop(self, ctx: commands.Context) -> Optional[discord.Message]:
"""Stop the server."""
current_status = await config.current_status()
if current_status == "stopped":
@ -151,7 +151,7 @@ class Pterodactyl(commands.Cog):
await message.edit(content="Cancelled.", view=None)
@pterodactyl_power.command(name = "restart")
async def pterodactyl_power_restart(self, ctx: commands.Context) -> None:
async def pterodactyl_power_restart(self, ctx: commands.Context) -> Optional[discord.Message]:
"""Restart the server."""
current_status = await config.current_status()
if current_status in ["starting", "stopping"]: