From ff93006d144a092316b1a00fbf3d78420257beea Mon Sep 17 00:00:00 2001 From: Skillz Date: Fri, 4 Sep 2020 16:49:43 -0400 Subject: [PATCH] fix slight bug in mentions --- src/handlers/channel.ts | 5 ++++- src/types/channel.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/handlers/channel.ts b/src/handlers/channel.ts index 2bd7095d5..5227cb4bc 100644 --- a/src/handlers/channel.ts +++ b/src/handlers/channel.ts @@ -171,7 +171,10 @@ export async function sendMessage( const result = await RequestManager.post( endpoints.CHANNEL_MESSAGES(channel.id), - content, + { + ...content, + allowed_mentions: content.mentions, + }, ); return createMessage(result as MessageCreateOptions); diff --git a/src/types/channel.ts b/src/types/channel.ts index a472fa8d2..789eeee68 100644 --- a/src/types/channel.ts +++ b/src/types/channel.ts @@ -96,7 +96,7 @@ export enum ChannelTypes { export interface MessageContent { mentions?: { /** An array of allowed mention types to parse from the content. */ - parse: ("roles" | "users" | "everyone")[]; + parse?: ("roles" | "users" | "everyone")[]; /** Array of role_ids to mention (Max size of 100) */ roles?: string[]; /** Array of user_ids to mention (Max size of 100) */