Skip to content

Commit

Permalink
Add pagination to config
Browse files Browse the repository at this point in the history
  • Loading branch information
raidensakura committed Jun 24, 2024
1 parent 7b04127 commit 3fdaaa1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion logviewer/logviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,22 @@ async def set_encryption_key(self, ctx: commands.Context, *, key: str):
@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.
Set the webserver 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.command(name="pagination")
@checks.has_permissions(PermissionLevel.OWNER)
async def set_pagination(self, ctx: commands.Context, pagination: int):
"""
Set the number of logs to display per page. Webserver must be restarted for this change to take effect.
"""
self.config["pagination"] = pagination
await self.update_config()
await ctx.send("Logviewer pagination 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 3fdaaa1

Please sign in to comment.