Package discord4j.rest.util
Class AllowedMentions.Builder
- java.lang.Object
-
- discord4j.rest.util.AllowedMentions.Builder
-
- Enclosing class:
- AllowedMentions
public static class AllowedMentions.Builder extends Object
A builder for creatingAllowedMentionsobjects.- See Also:
- Reference
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AllowedMentions.BuilderallowRole(Snowflake roleId)Add a role to the allowed roles list.AllowedMentions.BuilderallowRole(Snowflake... roleId)Add roles to the allowed roles list.AllowedMentions.BuilderallowUser(Snowflake userId)Add a user to the allowed users list.AllowedMentions.BuilderallowUser(Snowflake... userId)Add users to the allowed users list.AllowedMentionsbuild()Build theAllowedMentionsobjectAllowedMentions.BuilderparseType(AllowedMentions.Type type)Add a type to the allowed parsed types list.AllowedMentions.BuilderparseType(AllowedMentions.Type... type)Add types to the allowed parsed types list.AllowedMentions.BuilderrepliedUser(boolean repliedUser)Set whether to mention the author of the message being replied to.
-
-
-
Method Detail
-
parseType
public AllowedMentions.Builder parseType(AllowedMentions.Type type)
Add a type to the allowed parsed types list.- Parameters:
type- the type to parse- Returns:
- this builder
-
allowUser
public AllowedMentions.Builder allowUser(Snowflake userId)
Add a user to the allowed users list.- Parameters:
userId- the user to allow- Returns:
- this builder
-
allowRole
public AllowedMentions.Builder allowRole(Snowflake roleId)
Add a role to the allowed roles list.- Parameters:
roleId- the role to allow- Returns:
- this builder
-
parseType
public AllowedMentions.Builder parseType(AllowedMentions.Type... type)
Add types to the allowed parsed types list.- Parameters:
type- the types to parse- Returns:
- this builder
-
allowUser
public AllowedMentions.Builder allowUser(Snowflake... userId)
Add users to the allowed users list.- Parameters:
userId- the users to allow- Returns:
- this builder
-
allowRole
public AllowedMentions.Builder allowRole(Snowflake... roleId)
Add roles to the allowed roles list.- Parameters:
roleId- the roles to allow- Returns:
- this builder
-
repliedUser
public AllowedMentions.Builder repliedUser(boolean repliedUser)
Set whether to mention the author of the message being replied to.- Parameters:
repliedUser- whether to mention the author of the message being replied to.- Returns:
- this builder
-
build
public AllowedMentions build()
Build theAllowedMentionsobject- Returns:
- the allowed mentions object
-
-