public class TopicCommand extends ChannelCommand
Constructor and Description |
---|
TopicCommand(Client client,
String channel)
Constructs a TOPIC command for a given channel.
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
Executes the command.
|
TopicCommand |
query()
Sets this command to query the channel's current topic.
|
TopicCommand |
topic(String topic)
Sets the topic.
|
protected ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getChannel
public TopicCommand(@Nonnull Client client, @Nonnull String channel)
client
- the client on which this command is executingchannel
- channel targetedIllegalArgumentException
- if null parameters@Nonnull public TopicCommand topic(@Nullable String topic)
topic
- new topic or null to query the current topicIllegalArgumentException
- if topic invalid@Nonnull public TopicCommand query()
public void execute()
Command
@Nonnull protected ToStringer toStringer()
Command
ToStringer
for the command.toStringer
in class ChannelCommand
Copyright © 2013–2019 Kitteh. All rights reserved.