From 52f86e407455834c67a1299db9cbb304dfaa51df Mon Sep 17 00:00:00 2001 From: maanex Date: Fri, 26 May 2023 22:44:27 +0200 Subject: [PATCH] attempt at fixing quick replies --- src/modules/quickreplies.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/quickreplies.ts b/src/modules/quickreplies.ts index e4aac13..5502b09 100644 --- a/src/modules/quickreplies.ts +++ b/src/modules/quickreplies.ts @@ -1,4 +1,4 @@ -import { GuildMember, Message, TextChannel } from 'discord.js' +import { GuildMember, Message, TextChannel, ThreadChannel } from 'discord.js' import * as fuzzy from 'fuzzy' import { QuickRepliesMainPageData } from '../cordo/states/quickreplies/main' import Database from '../database/database' @@ -234,13 +234,13 @@ export default class QuickRepliesModule extends Module { ) } - private async sendReply(channel: TextChannel, member: GuildMember, text: string, pingUser?: string) { + private async sendReply(channel: TextChannel | ThreadChannel, member: GuildMember, text: string, pingUser?: string) { if (!text) return try { const webhook = await Webhooks.allocateWebhook(channel) webhook.send({ - threadId: channel.isThread ? channel.id : undefined, + threadId: channel.isThread() ? channel.id : undefined, content: text, avatarURL: member.user.avatarURL(), username: member.nickname || member.user.username,