diff --git a/egg.yml b/egg.yml index c679a2ee5..3af7f3b38 100644 --- a/egg.yml +++ b/egg.yml @@ -2,7 +2,7 @@ name: Discordeno description: >- Discord Deno TypeScript API library wrapper(Officially vetted library by Discord Team) https://discordeno.netlify.app -version: 9.0.10 +version: 9.0.12 stable: true entry: mod.ts repository: 'https://github.com/Skillz4Killz/Discordeno' diff --git a/src/handlers/channel.ts b/src/handlers/channel.ts index 1e82245b8..0e2580996 100644 --- a/src/handlers/channel.ts +++ b/src/handlers/channel.ts @@ -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),