public class KickCommand extends ChannelCommand<KickCommand>
Command.Tags| Constructor and Description |
|---|
KickCommand(@NonNull Client client,
@NonNull String channel)
Constructs a KICK command for a given channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Executes the command.
|
@NonNull KickCommand |
reason(@Nullable String reason)
Sets the reason for this kick.
|
@NonNull KickCommand |
target(@NonNull String target)
Sets the target of this kick.
|
@NonNull KickCommand |
target(@NonNull User target)
Sets the target of this kick.
|
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getChannelgetClient, sendCommandLine, sendCommandLine, tags, toStringpublic KickCommand(@NonNull Client client, @NonNull String channel)
client - the client on which this command is executingchannel - channel targetedIllegalArgumentException - if null parametersChannel.kick(User),
Channel.kick(User, String)public @NonNull KickCommand target(@NonNull String target)
target - targetIllegalArgumentException - if target is null or contains invalid characterspublic @NonNull KickCommand target(@NonNull User target)
target - targetIllegalArgumentException - if target is null or from a different Clientpublic @NonNull KickCommand reason(@Nullable String reason)
reason - reason or null to provide no reasonIllegalArgumentException - if reason contains invalid characterspublic void execute()
execute in class Command<ChannelCommand<KickCommand>>IllegalStateException - if target is not definedprotected @NonNull ToStringer toStringer()
CommandToStringer for the command.toStringer in class ChannelCommand<KickCommand>Copyright © 2013–2021 Kitteh. All rights reserved.