3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-23 17:45:03 +00:00

allow running cleancmd on news and thread channels

This commit is contained in:
almeidx 2021-09-21 12:12:41 +01:00
parent c84d1a0be1
commit 1e9c31de1b
No known key found for this signature in database
GPG key ID: 01C5E03866747F46

View file

@ -84,7 +84,7 @@ export async function cleanCmd(pluginData: GuildPluginData<UtilityPluginType>, a
} }
const targetChannel = args.channel ? pluginData.guild.channels.cache.get(args.channel as Snowflake) : msg.channel; const targetChannel = args.channel ? pluginData.guild.channels.cache.get(args.channel as Snowflake) : msg.channel;
if (!targetChannel || !(targetChannel instanceof TextChannel)) { if (!targetChannel?.isText()) {
sendErrorMessage(pluginData, msg.channel, `Invalid channel specified`); sendErrorMessage(pluginData, msg.channel, `Invalid channel specified`);
return; return;
} }