Skip to content

Commit

Permalink
Fix a bug where the bot tries to delete a non-existing message
Browse files Browse the repository at this point in the history
  • Loading branch information
laggron42 committed Aug 3, 2019
1 parent eff6c24 commit d7c12ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion warnsystem/warnsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ async def update_message():
)
finally:
task.cancel()
await message.delete()
if message:
await message.delete()

# all settings
@commands.group()
Expand Down

0 comments on commit d7c12ad

Please sign in to comment.