diff --git a/src/bot.ts b/src/bot.ts
index 81f892b24800d597c2f3d48f11085df3a4a1d269..f73671ce257304877b2b6f242d268bece6a11e78 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -106,6 +106,7 @@ export class DiscordBot {
         // init vars
         this.sentMessages = [];
         this.discordMessageQueue = {};
+        this.channelLocks = {};
         this.lastEventIds = {};
     }
 
@@ -183,7 +184,6 @@ export class DiscordBot {
 
     public async run(): Promise<void> {
         const client = await this.clientFactory.getClient();
-
         if (!this.config.bridge.disableTypingNotifications) {
             client.on("typingStart", async (c, u) => {
                 try {
diff --git a/test/test_discordbot.ts b/test/test_discordbot.ts
index 2eeccfc065c3506ed596029794b071f94654f6af..4dd1ad806e8173127c73e73aaaad0d00f93b44ec 100644
--- a/test/test_discordbot.ts
+++ b/test/test_discordbot.ts
@@ -382,7 +382,7 @@ describe("DiscordBot", () => {
             const CHANID = 123;
             // Send delay of 50ms, 2 seconds / 50ms - 5 for safety.
             for (let i = 0; i < ITERATIONS; i++) {
-              await client.emit("message", { n: i, channel: { id: CHANID} });
+                await client.emit("message", { channel: { guild: { id: CHANID }, id: CHANID} });
             }
             await discordBot.discordMessageQueue[CHANID];
         });
@@ -409,7 +409,7 @@ describe("DiscordBot", () => {
             const CHANID = 123;
             // Send delay of 50ms, 2 seconds / 50ms - 5 for safety.
             for (let n = 0; n < ITERATIONS; n++) {
-                await client.emit("message", { n, channel: { id: CHANID} });
+                await client.emit("message", { n, channel: { guild: { id: CHANID }, id: CHANID} });
             }
             await discordBot.discordMessageQueue[CHANID];
             assert.equal(expected, ITERATIONS);