public class TopicCommand extends ChannelCommand<TopicCommand>
Command.Tags| Constructor and Description |
|---|
TopicCommand(@NonNull Client client,
@NonNull String channel)
Constructs a TOPIC command for a given channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Executes the command.
|
@NonNull TopicCommand |
query()
Sets this command to query the channel's current topic.
|
@NonNull TopicCommand |
topic(@Nullable String topic)
Sets the topic.
|
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getChannelgetClient, sendCommandLine, sendCommandLine, tags, toStringpublic TopicCommand(@NonNull Client client, @NonNull String channel)
client - the client on which this command is executingchannel - channel targetedIllegalArgumentException - if null parameterspublic @NonNull TopicCommand topic(@Nullable String topic)
topic - new topic or null to query the current topicIllegalArgumentException - if topic invalidpublic @NonNull TopicCommand query()
public void execute()
Commandexecute in class Command<ChannelCommand<TopicCommand>>protected @NonNull ToStringer toStringer()
CommandToStringer for the command.toStringer in class ChannelCommand<TopicCommand>Copyright © 2013–2021 Kitteh. All rights reserved.