From 95e7987fee3c548cb2fcc361ca83285b82e8394b Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sun, 1 Oct 2023 01:49:03 +1300 Subject: [PATCH] Query the correct column in onThreadCreate --- d2m/event-dispatcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2m/event-dispatcher.js b/d2m/event-dispatcher.js index b33fac4..f19437f 100644 --- a/d2m/event-dispatcher.js +++ b/d2m/event-dispatcher.js @@ -129,7 +129,7 @@ module.exports = { * @param {import("discord-api-types/v10").APIThreadChannel} thread */ async onThreadCreate(client, thread) { - const parentRoomID = select("channel_room", "room_id", "WHERE channel_room = ?").pluck().get(thread.parent_id) + const parentRoomID = select("channel_room", "room_id", "WHERE channel_id = ?").pluck().get(thread.parent_id) if (!parentRoomID) return // Not interested in a thread if we aren't interested in its wider channel const threadRoomID = await createRoom.syncRoom(thread.id) // Create room (will share the same inflight as the initial message to the thread) await announceThread.announceThread(parentRoomID, threadRoomID, thread)