Package discord4j.rest.util
Class AllowedMentions
- java.lang.Object
-
- discord4j.rest.util.AllowedMentions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAllowedMentions.BuilderA builder for creatingAllowedMentionsobjects.static classAllowedMentions.TypeAn allowed mentions type, grouped into role mentions, user mentions and everyone mentions (includes @everyone and @here).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AllowedMentions.Builderbuilder()Create a builder for thisAllowedMentionsclass.static AllowedMentions.Builderbuilder(AllowedMentions template)Copy an existingAllowedMentionsobject to a new builder.AllowedMentions.Buildermutate()Copy thisAllowedMentionsobject to a new builder.static AllowedMentionssuppressAll()Create anAllowedMentionsobject that will suppress all mentions.static AllowedMentionssuppressEveryone()Create anAllowedMentionsobject that will suppress @everyone and @here mentions.discord4j.discordjson.json.AllowedMentionsDatatoData()Map thisAllowedMentionsobject to aAllowedMentionsDataJSON
-
-
-
Method Detail
-
builder
public static AllowedMentions.Builder builder()
Create a builder for thisAllowedMentionsclass. Building this object without any configuration is equivalent to suppressing all mentions.- Returns:
- A builder class for allowed mentions
-
builder
public static AllowedMentions.Builder builder(AllowedMentions template)
Copy an existingAllowedMentionsobject to a new builder.- Parameters:
template- the allowed mentions object to copy- Returns:
- A builder class for allowed mentions
-
suppressAll
public static AllowedMentions suppressAll()
Create anAllowedMentionsobject that will suppress all mentions.- Returns:
- A suppressing allowed mentions
-
suppressEveryone
public static AllowedMentions suppressEveryone()
Create anAllowedMentionsobject that will suppress @everyone and @here mentions.- Returns:
- A suppressing allowed mentions
-
mutate
public AllowedMentions.Builder mutate()
Copy thisAllowedMentionsobject to a new builder.- Returns:
- A builder class for allowed mentions
-
toData
public discord4j.discordjson.json.AllowedMentionsData toData()
Map thisAllowedMentionsobject to aAllowedMentionsDataJSON- Returns:
- JSON object
-
-