From 03d72dd5faf1eb62f824bc5230ba57c235dba9fe Mon Sep 17 00:00:00 2001 From: Pred <61093863+Predeactor@users.noreply.github.com> Date: Sun, 4 Apr 2021 11:34:11 +0200 Subject: [PATCH] [Cleanup] Pre-set the variable to `None` in `[p]cleanup before` (#4931) * [Cleanup] Handle missing message_id and reply * Fix a new situation where we could end up with unwanted `None` * I suck at this (style fix) Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> --- redbot/cogs/cleanup/cleanup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/redbot/cogs/cleanup/cleanup.py b/redbot/cogs/cleanup/cleanup.py index d93079396..1cb741a27 100644 --- a/redbot/cogs/cleanup/cleanup.py +++ b/redbot/cogs/cleanup/cleanup.py @@ -348,6 +348,7 @@ class Cleanup(commands.Cog): channel = ctx.channel author = ctx.author + before = None if message_id: try: