fix(helpers/messages): sendMessage add new thread types to channel type check

This commit is contained in:
ITOH
2021-05-01 23:36:59 +02:00
parent 8840ed5662
commit 478952d9eb
+3
View File
@@ -29,6 +29,9 @@ export async function sendMessage(
DiscordChannelTypes.Dm, DiscordChannelTypes.Dm,
DiscordChannelTypes.GuildNews, DiscordChannelTypes.GuildNews,
DiscordChannelTypes.GuildText, DiscordChannelTypes.GuildText,
DiscordChannelTypes.GuildPublicThread,
DiscordChannelTypes.GuildPivateThread,
DiscordChannelTypes.GuildNewsThread,
].includes(channel.type) ].includes(channel.type)
) { ) {
throw new Error(Errors.CHANNEL_NOT_TEXT_BASED); throw new Error(Errors.CHANNEL_NOT_TEXT_BASED);