fix slight bug in mentions

This commit is contained in:
Skillz
2020-09-04 16:49:43 -04:00
parent ad810a610e
commit ff93006d14
2 changed files with 5 additions and 2 deletions

View File

@@ -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);

View File

@@ -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) */