ForumTag
Implementation of a discord forum tag object as a luau builder.
https://discord.com/developers/docs/resources/channel#forum-tag-object
Summary
Properties
ForumTag.name :: stringForumTag.moderated :: booleanForumTag.emojiId :: string?ForumTag.emojiName :: string?ForumTag.id :: string?Properties
Section titled “Properties”The name of the tag that is displayed.
moderated
Section titled “moderated”Whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission.
emojiId
Section titled “emojiId”The id of a guild’s custom emoji.
emojiName
Section titled “emojiName”The unicode character of the emoji.
The id of the tag.
Methods
Section titled “Methods”setEmoji
Section titled “setEmoji”ForumTag : setEmoji ( emojiId , emojiName ) -> ForumTag
Sets either the id of a guilds custom emoji, or a unicode character of an emoji.
setModerated
Section titled “setModerated”ForumTag : setModerated ( isModerated ) -> ForumTag
Sets whether this tag can only be added to or removed from threads by a member with the MANAGE_THREADS permission
Parameters
| isModerated: boolean |
Returns
| ForumTag |
setName
Section titled “setName”ForumTag : setName ( tagName ) -> ForumTag
Set the name of this Forum Tag.
Parameters
| tagName: string |
Returns
| ForumTag |
ForumTag : build ( ) -> JSON
Responsible for buillding the forum tag object that the Discord API can understand.
Returns
| JSON |
Functions
Section titled “Functions”ForumTag . new ( resource ) -> ForumTag
Constructs a new tag builder.
local tag = ForumTag.new("tag-name") :setModerated(true) :build()Parameters
| resource: { tagName: string, emoji: { name, id: apiTypes.Snowflake, } |
Returns
| ForumTag |
fromId
Section titled “fromId”ForumTag . fromId ( resource ) -> ForumTag
Enables us to construct a Tag Builder object from an existing tag object, used when modifying forum tags.
Parameters
| resource: { tagId: apiTypes.Snowflake, tagName: string, emoji: { name, id: apiTypes.Snowflake, } |
Returns
| ForumTag |