Package discord4j.rest.util
Class AllowedMentions
- java.lang.Object
-
- discord4j.rest.util.AllowedMentions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AllowedMentions.Builder
A builder for creatingAllowedMentions
objects.static class
AllowedMentions.Type
An 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.Builder
builder()
Create a builder for thisAllowedMentions
class.static AllowedMentions.Builder
builder(AllowedMentions template)
Copy an existingAllowedMentions
object to a new builder.AllowedMentions.Builder
mutate()
Copy thisAllowedMentions
object to a new builder.static AllowedMentions
suppressAll()
Create anAllowedMentions
object that will suppress all mentions.static AllowedMentions
suppressEveryone()
Create anAllowedMentions
object that will suppress @everyone and @here mentions.discord4j.discordjson.json.AllowedMentionsData
toData()
Map thisAllowedMentions
object to aAllowedMentionsData
JSON
-
-
-
Method Detail
-
builder
public static AllowedMentions.Builder builder()
Create a builder for thisAllowedMentions
class. 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 existingAllowedMentions
object 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 anAllowedMentions
object that will suppress all mentions.- Returns:
- A suppressing allowed mentions
-
suppressEveryone
public static AllowedMentions suppressEveryone()
Create anAllowedMentions
object that will suppress @everyone and @here mentions.- Returns:
- A suppressing allowed mentions
-
mutate
public AllowedMentions.Builder mutate()
Copy thisAllowedMentions
object to a new builder.- Returns:
- A builder class for allowed mentions
-
toData
public discord4j.discordjson.json.AllowedMentionsData toData()
Map thisAllowedMentions
object to aAllowedMentionsData
JSON- Returns:
- JSON object
-
-