public interface Channel extends MessageReceiver, Staleable
Modifier and Type | Interface and Description |
---|---|
static interface |
Channel.Commands
Provides commands.
|
static interface |
Channel.Topic
Information about the channel's topic.
|
Modifier and Type | Method and Description |
---|---|
@NonNull Channel.Commands |
commands()
Provides access to
Command s. |
default @NonNull Optional<Channel> |
getLatest()
Gets the latest snapshot of this channel.
|
@NonNull Optional<List<ModeInfo>> |
getModeInfoList(@NonNull ChannelMode mode)
Gets the tracked mode info for the channel, if tracked.
|
@NonNull ModeStatusList<ChannelMode> |
getModes()
Gets the channel's current known modes.
|
@NonNull List<String> |
getNicknames()
Gets the nicknames of users in the channel, if the client is in the
channel.
|
@NonNull Channel.Topic |
getTopic()
Gets the channel's topic.
|
@NonNull Optional<User> |
getUser(@NonNull String nick)
Gets a user by their nick, if they are known to the client.
|
@NonNull Optional<SortedSet<ChannelUserMode>> |
getUserModes(@NonNull String nick)
Gets the user modes of a given nickname in the channel.
|
default @NonNull Optional<SortedSet<ChannelUserMode>> |
getUserModes(@NonNull User user)
Gets the user modes of a given user in the channel.
|
@NonNull List<User> |
getUsers()
Gets all Users known to be in the channel.
|
boolean |
hasCompleteUserData()
Gets if this Channel has complete user data available, only possible
if the Client is in the channel and the WHO list has sent.
|
default void |
join()
Joins the channel.
|
default void |
join(@NonNull String key)
Joins the channel with a key.
|
default void |
kick(@NonNull User user)
Kicks the given user from this channel without a reason.
|
default void |
kick(@NonNull User user,
@NonNull String reason)
Kicks the given user from this channel for the given reason.
|
default void |
part()
Parts the channel without stating a reason.
|
default void |
part(@NonNull String reason)
Parts the channel.
|
void |
setModeInfoTracking(@NonNull ChannelMode mode,
boolean track)
Sets whether a particular type A mode should be tracked for this
channel, and sends a request for the full list.
|
default void |
setTopic(@NonNull String topic)
Attempts to set the topic of the channel.
|
getLowerCaseMessagingName, getMessagingName, sendCtcpMessage, sendMessage, sendMultiLineMessage, sendMultiLineMessage, sendMultiLineNotice, sendMultiLineNotice, sendNotice
getLowerCaseName, getName
getCreationTime
getClient
default @NonNull Optional<Channel> getLatest()
@NonNull Optional<List<ModeInfo>> getModeInfoList(@NonNull ChannelMode mode)
mode
- type A mode to acquireIllegalArgumentException
- for null or non-type-A mode@NonNull ModeStatusList<ChannelMode> getModes()
@NonNull List<String> getNicknames()
@NonNull Channel.Topic getTopic()
@NonNull Optional<User> getUser(@NonNull String nick)
nick
- user's nickIllegalArgumentException
- if nick is nullhasCompleteUserData()
,
ChannelUsersUpdatedEvent
@NonNull List<User> getUsers()
getNicknames()
.hasCompleteUserData()
,
ChannelUsersUpdatedEvent
@NonNull Optional<SortedSet<ChannelUserMode>> getUserModes(@NonNull String nick)
nick
- user's nickdefault @NonNull Optional<SortedSet<ChannelUserMode>> getUserModes(@NonNull User user)
user
- userboolean hasCompleteUserData()
ChannelUsersUpdatedEvent
default void join()
Client.addChannel(String...)
default void join(@NonNull String key)
key
- channel keyClient.addKeyProtectedChannel(String, String)
default void kick(@NonNull User user, @NonNull String reason)
user
- user to kickreason
- reason for the kickdefault void kick(@NonNull User user)
user
- user to kick@NonNull Channel.Commands commands()
Command
s.default void part()
Client.removeChannel(String)
default void part(@NonNull String reason)
reason
- leaving reasonClient.removeChannel(String, String)
void setModeInfoTracking(@NonNull ChannelMode mode, boolean track)
RequestedChannelJoinCompleteEvent
to ensure it's always set.mode
- mode to tracktrack
- true to track, false to stop trackingIllegalArgumentException
- for null or non-type-A mode or
non-supported type A modeIllegalStateException
- if not in channelChannelModeInfoListEvent
default void setTopic(@NonNull String topic)
topic
- new topicCopyright © 2013–2021 Kitteh. All rights reserved.