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 |
|---|---|
Channel.Commands |
commands()
Provides access to
Commands. |
default Optional<Channel> |
getLatest()
Gets the latest snapshot of this channel.
|
Optional<List<ModeInfo>> |
getModeInfoList(ChannelMode mode)
Gets the tracked mode info for the channel, if tracked.
|
ModeStatusList<ChannelMode> |
getModes()
Gets the channel's current known modes.
|
List<String> |
getNicknames()
Gets the nicknames of users in the channel, if the client is in the
channel.
|
Channel.Topic |
getTopic()
Gets the channel's topic.
|
Optional<User> |
getUser(String nick)
Gets a user by their nick, if they are known to the client.
|
Optional<SortedSet<ChannelUserMode>> |
getUserModes(String nick)
Gets the user modes of a given nickname in the channel.
|
default Optional<SortedSet<ChannelUserMode>> |
getUserModes(User user)
Gets the user modes of a given user in the channel.
|
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(String key)
Joins the channel with a key.
|
default void |
kick(User user)
Kicks the given user from this channel without a reason.
|
default void |
kick(User user,
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(String reason)
Parts the channel.
|
void |
setModeInfoTracking(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(String topic)
Attempts to set the topic of the channel.
|
getLowerCaseMessagingName, getMessagingName, sendCtcpMessage, sendMessage, sendMultiLineMessage, sendMultiLineMessage, sendMultiLineNotice, sendMultiLineNotice, sendNoticegetLowerCaseName, getNamegetCreationTimegetClient@Nonnull default 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 nick@Nonnull default Optional<SortedSet<ChannelUserMode>> getUserModes(@Nonnull User user)
user - userboolean hasCompleteUserData()
ChannelUsersUpdatedEventdefault 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()
Commands.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 channelChannelModeInfoListEventCopyright © 2013–2019 Kitteh. All rights reserved.