Package com.github.mafelp.discord
Class RoleAdmin
java.lang.Object
com.github.mafelp.discord.RoleAdmin
Class to manage the role that allows users to see the channel,
specified in ChannelAdmin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.javacord.api.entity.permission.Role
createNewRole(org.javacord.api.entity.server.Server server, String name, @Nullable org.javacord.api.entity.message.embed.EmbedBuilder successEmbed, @Nullable org.javacord.api.interaction.callback.InteractionImmediateResponseBuilder successBuilder)
Method creates a new Role on a server with the specified name.
-
Constructor Details
-
RoleAdmin
public RoleAdmin()
-
-
Method Details
-
createNewRole
public static org.javacord.api.entity.permission.Role createNewRole(org.javacord.api.entity.server.Server server, String name, @Nullable @Nullable org.javacord.api.entity.message.embed.EmbedBuilder successEmbed, @Nullable @Nullable org.javacord.api.interaction.callback.InteractionImmediateResponseBuilder successBuilder) throws CompletionExceptionMethod creates a new Role on a server with the specified name.- Parameters:
server
- The server to create the new role on.name
- The name of the new role.successEmbed
- The Embed to send on a success.successBuilder
- The immediate responseBuilder to answer to the slash commands.- Returns:
- The newly created role
- Throws:
CompletionException
-