Package discord4j.rest.util
Class AllowedMentions.Builder
java.lang.Object
discord4j.rest.util.AllowedMentions.Builder
- Enclosing class:
- AllowedMentions
A builder for creating
AllowedMentions
objects.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdd a role to the allowed roles list.Add roles to the allowed roles list.Add a user to the allowed users list.Add users to the allowed users list.build()
Build theAllowedMentions
objectAdd a type to the allowed parsed types list.parseType
(AllowedMentions.Type... type) Add types to the allowed parsed types list.repliedUser
(boolean repliedUser) Set whether to mention the author of the message being replied to.
-
Method Details
-
parseType
Add a type to the allowed parsed types list.- Parameters:
type
- the type to parse- Returns:
- this builder
-
allowUser
Add a user to the allowed users list.- Parameters:
userId
- the user to allow- Returns:
- this builder
-
allowRole
Add a role to the allowed roles list.- Parameters:
roleId
- the role to allow- Returns:
- this builder
-
parseType
Add types to the allowed parsed types list.- Parameters:
type
- the types to parse- Returns:
- this builder
-
allowUser
Add users to the allowed users list.- Parameters:
userId
- the users to allow- Returns:
- this builder
-
allowRole
Add roles to the allowed roles list.- Parameters:
roleId
- the roles to allow- Returns:
- this builder
-
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
Build theAllowedMentions
object- Returns:
- the allowed mentions object
-