From b867a2fa08ddcd0492101ec4189ca89a2d5584d8 Mon Sep 17 00:00:00 2001
From: Will Hunt <will@half-shot.uk>
Date: Thu, 16 May 2019 18:53:55 +0100
Subject: [PATCH] lock.i

---
 src/bot.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bot.ts b/src/bot.ts
index 21e29e5..387c0b8 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -156,8 +156,8 @@ export class DiscordBot {
 
     public unlockChannel(channel: Discord.Channel) {
         const lock = this.channelLocks[channel.id];
-        if (lock) {
-            clearTimeout(lock.i!);
+        if (lock && lock.i) {
+            clearTimeout(lock.i);
         }
         delete this.channelLocks[channel.id];
     }
-- 
GitLab