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:
parent
c84d1a0be1
commit
1e9c31de1b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue