public class NoticeCommand extends Command<NoticeCommand>
Command.Tags| Constructor and Description |
|---|
NoticeCommand(@NonNull Client client)
Constructs a notice command.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Executes the command.
|
@NonNull NoticeCommand |
message(@Nullable String message)
Sets the message to send.
|
@NonNull NoticeCommand |
target(@NonNull MessageReceiver target) |
@NonNull NoticeCommand |
target(@NonNull String target)
Sets the target of this notice.
|
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getClient, sendCommandLine, sendCommandLine, tags, toStringpublic NoticeCommand(@NonNull Client client)
client - the client on which this command is executingIllegalArgumentException - if null parameterspublic @NonNull NoticeCommand target(@NonNull String target)
target - targetIllegalArgumentException - if target is null or contains invalid characterspublic @NonNull NoticeCommand target(@NonNull MessageReceiver target)
public @NonNull NoticeCommand message(@Nullable String message)
message - messageIllegalArgumentException - if message contains invalid characterspublic void execute()
execute in class Command<NoticeCommand>IllegalStateException - if target or message is not definedprotected @NonNull ToStringer toStringer()
CommandToStringer for the command.toStringer in class Command<NoticeCommand>Copyright © 2013–2021 Kitteh. All rights reserved.