From 79a50e9059f1d46dcb338915436c5850d7225957 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Tue, 19 Apr 2022 17:09:20 -0600 Subject: [PATCH] Fix tail command off-by-1 error --- jarvis/cogs/botutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jarvis/cogs/botutil.py b/jarvis/cogs/botutil.py index 647232d..98c961a 100644 --- a/jarvis/cogs/botutil.py +++ b/jarvis/cogs/botutil.py @@ -23,7 +23,7 @@ class BotutilCog(Scale): async with AIOFile("jarvis.log", "r") as af: async for line in LineReader(af): lines.append(line) - if len(lines) == count: + if len(lines) == count + 1: lines.pop(0) log = "".join(lines) await ctx.reply(content=f"```\n{log}\n```")