This commit is contained in:
Miikka 2022-07-07 01:00:32 +03:00 committed by GitHub
parent f5125cb3c3
commit 8574d61670
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}`,
});