Skip to content

Commit

Permalink
Add change port command
Browse files Browse the repository at this point in the history
  • Loading branch information
raidensakura committed Apr 12, 2024
1 parent 0790e75 commit 58aacf3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions logviewer/logviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ async def set_encryption_key(self, ctx: commands.Context, *, key: str):
await ctx.message.delete()
await ctx.send("Logviewer encryption key set.")

@logviewer_config.command(name="port")
@checks.has_permissions(PermissionLevel.OWNER)
async def set_port(self, ctx: commands.Context, port: int):
"""
Set the webserer port for Logviewer to listen on. Webserver must be restarted for this change to take effect.
"""
self.config["port"] = port
await self.update_config()
await ctx.send("Logviewer port set.")

@logviewer_config.group(name="remove", aliases=["reset", "delete"])
@checks.has_permissions(PermissionLevel.OWNER)
async def remove_config(self, ctx: commands.Context):
Expand Down

0 comments on commit 58aacf3

Please sign in to comment.