[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>
This commit is contained in:
Pred 2021-04-04 11:34:11 +02:00 committed by GitHub
parent 847444eab1
commit 03d72dd5fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -348,6 +348,7 @@ class Cleanup(commands.Cog):
channel = ctx.channel
author = ctx.author
before = None
if message_id:
try: