This commit is contained in:
Skillz
2020-10-27 12:58:27 -04:00
parent b01c96df6a
commit b65c31dcb2
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -164,7 +164,12 @@ export async function sendMessage(
const channel = await cacheHandlers.get("channels", channelID);
if (!channel) throw new Error(Errors.CHANNEL_NOT_FOUND);
if (![ChannelTypes.DM, ChannelTypes.GUILD_NEWS, ChannelTypes.GUILD_TEXT].includes(channel.type)) throw new Error(Errors.CHANNEL_NOT_TEXT_BASED)
if (
![ChannelTypes.DM, ChannelTypes.GUILD_NEWS, ChannelTypes.GUILD_TEXT]
.includes(channel.type)
) {
throw new Error(Errors.CHANNEL_NOT_TEXT_BASED);
}
const result = await RequestManager.post(
endpoints.CHANNEL_MESSAGES(channelID),