Java Code Examples for net.dv8tion.jda.api.Permission#KICK_MEMBERS
The following examples show how to use
net.dv8tion.jda.api.Permission#KICK_MEMBERS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SoftbanCommand.java From SkyBot with GNU Affero General Public License v3.0 | 6 votes |
public SoftbanCommand() { this.shouldLoadMembers = true; this.requiresArgs = true; this.name = "softban"; this.help = "Kicks a user from the server **(THIS WILL DELETE MESSAGES)**"; this.usage = "<@user> [-r reason]"; this.userPermissions = new Permission[]{ Permission.KICK_MEMBERS, }; this.botPermissions = new Permission[]{ Permission.BAN_MEMBERS, }; this.flags = new Flag[]{ new Flag( 'r', "reason", "Sets the reason for this kick" ), }; }
Example 2
Source File: KickCommand.java From SkyBot with GNU Affero General Public License v3.0 | 6 votes |
public KickCommand() { this.shouldLoadMembers = true; this.requiresArgs = true; this.name = "kick"; this.aliases = new String[]{"yeet"}; this.help = "Kicks a user from the server"; this.usage = "<@user> [-r reason]"; this.userPermissions = new Permission[]{ Permission.KICK_MEMBERS, }; this.botPermissions = new Permission[]{ Permission.KICK_MEMBERS, }; this.flags = new Flag[]{ new Flag( 'r', "reason", "Sets the reason for this kick" ), }; }
Example 3
Source File: UnwarnCommand.java From SkyBot with GNU Affero General Public License v3.0 | 5 votes |
public UnwarnCommand() { this.shouldLoadMembers = true; this.requiresArgs = true; this.name = "unwarn"; this.help = "Removes the latest warning of a user in this server"; this.usage = "<@user>"; this.userPermissions = new Permission[]{ Permission.KICK_MEMBERS, }; }
Example 4
Source File: GuildImpl.java From JDA with Apache License 2.0 | 5 votes |
@Nonnull @Override public RestAction<Integer> retrievePrunableMemberCount(int days) { if (!getSelfMember().hasPermission(Permission.KICK_MEMBERS)) throw new InsufficientPermissionException(this, Permission.KICK_MEMBERS); Checks.check(days >= 1 && days <= 30, "Provided %d days must be between 1 and 30.", days); Route.CompiledRoute route = Route.Guilds.PRUNABLE_COUNT.compile(getId()).withQueryParams("days", Integer.toString(days)); return new RestActionImpl<>(getJDA(), route, (response, request) -> response.getObject().getInt("pruned")); }
Example 5
Source File: ModBaseCommand.java From SkyBot with GNU Affero General Public License v3.0 | 4 votes |
public ModBaseCommand() { this.category = CommandCategory.MODERATION; this.userPermissions = new Permission[]{Permission.KICK_MEMBERS, Permission.BAN_MEMBERS}; }