From 8574d61670fa59927a7ff8971c5fed54f3630f7c Mon Sep 17 00:00:00 2001 From: Miikka <2606411+Dragory@users.noreply.github.com> Date: Thu, 7 Jul 2022 01:00:32 +0300 Subject: [PATCH] debug --- .../src/plugins/RoleButtons/functions/applyRoleButtons.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts index b3e92f43..bc4c5c23 100644 --- a/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts +++ b/backend/src/plugins/RoleButtons/functions/applyRoleButtons.ts @@ -55,7 +55,10 @@ export async function applyRoleButtons( } const channel = await pluginData.guild.channels.fetch(configItem.message.channel_id).catch(() => null); - if (!channel || !channel?.isText()) { + if (channel && (!channel.isText || typeof channel.isText !== "function")) { + console.log("wtf", channel); + } + if (!channel || !channel?.isText?.()) { pluginData.getPlugin(LogsPlugin).logBotAlert({ body: `Text channel not found for role_buttons/${configItem.name}`, });