feat(pterodactyl): added configuration command for setting the console channel

This commit is contained in:
Seaswimmer 2024-02-28 12:44:12 -05:00
parent cebc2223d9
commit 0961985168
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -130,3 +130,9 @@ class Pterodactyl(commands.Cog):
self.logger.debug("Configuration value set: server_id = %s\nRestarting task...", server_id)
self.task.cancel()
self.task = self.get_task()
@pterodactyl_config.command(name = "consolechannel")
async def pterodactyl_config_console_channel(self, ctx: commands.Context, channel: discord.TextChannel):
"""Set the channel to send console output to."""
await self.config.console_channel.set(channel.id)
await ctx.send(f"Console channel set to {channel.mention}")