public class KickCommand extends ChannelCommand
| Constructor and Description |
|---|
KickCommand(Client client,
String channel)
Constructs a KICK command for a given channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Executes the command.
|
KickCommand |
reason(String reason)
Sets the reason for this kick.
|
KickCommand |
target(String target)
Sets the target of this kick.
|
KickCommand |
target(User target)
Sets the target of this kick.
|
protected ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getChannelpublic 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)@Nonnull public KickCommand target(@Nonnull String target)
target - targetIllegalArgumentException - if target is null or contains invalid characters@Nonnull public KickCommand target(@Nonnull User target)
target - targetIllegalArgumentException - if target is null or from a different Client@Nonnull public KickCommand reason(@Nullable String reason)
reason - reason or null to provide no reasonIllegalArgumentException - if reason contains invalid characterspublic void execute()
execute in class CommandIllegalStateException - if target is not defined@Nonnull protected ToStringer toStringer()
CommandToStringer for the command.toStringer in class ChannelCommandCopyright © 2013–2019 Kitteh. All rights reserved.