Skip to content

AllowedMention

Implementation of discords AllowedMention object as a Luau builder.

https://discord.com/developers/docs/resources/message#allowed-mentions-object

Properties

The AllowedMention instance has no set properties!

Methods

The AllowedMention instance has no set methods!

Functions

addUserMention

AllowedMention . addUserMention (

     self: AllowedMention
     userId: string
)  -> ()

Add a user mention to the allowed mentions for this message.

addRoleMention

AllowedMention . addRoleMention (

     self: AllowedMention
     roleId: string
)  -> ()

Add a role mention to the allowed mentions for this message.

setRepliedUser

AllowedMention . setRepliedUser (

     self: AllowedMention
     repliedUser: boolean
)  -> ()

For replies, whether to mention the author of the message being replied to (default false)

setMentionsEveryone

AllowedMention . setMentionsEveryone (

     self: AllowedMention
     mentionsEveryone: boolean
)  -> ()

Controls @everyone and @here mentions

build

AllowedMention . build (

     self: AllowedMention
)  -> ()

Responsible for building the AllowedMention JSON that can be parsed by the Discord API.

new

AllowedMention . new (

     resource: {
      {… roles: { apiTypes.Snowflake …}    }
)  -> ()

Responsible for creating a new AllowedMention.