Package org.javacord.core.entity.channel
Class ServerTextChannelImpl
- java.lang.Object
-
- org.javacord.core.entity.channel.ServerChannelImpl
-
- org.javacord.core.entity.channel.ServerTextChannelImpl
-
- All Implemented Interfaces:
Comparable<T>
,Formattable
,Categorizable
,Channel
,ChannelSpecialization
,ServerChannel
,ServerTextChannel
,TextChannel
,DiscordEntity
,Mentionable
,Messageable
,Nameable
,Updatable<T>
,UpdatableFromCache
,ChannelAttachableListenerManager
,ServerChannelAttachableListenerManager
,ServerTextChannelAttachableListenerManager
,TextChannelAttachableListenerManager
,Specializable<T>
,InternalTextChannel
,InternalChannelAttachableListenerManager
,InternalTextChannelAttachableListenerManager
,InternalServerChannelAttachableListenerManager
,InternalServerTextChannelAttachableListenerManager
,Cleanupable
public class ServerTextChannelImpl extends ServerChannelImpl implements ServerTextChannel, Cleanupable, InternalTextChannel, InternalServerTextChannelAttachableListenerManager
The implementation ofServerTextChannel
.
-
-
Constructor Summary
Constructors Constructor Description ServerTextChannelImpl(DiscordApiImpl api, ServerImpl server, com.fasterxml.jackson.databind.JsonNode data)
Creates a new server text channel object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup()
Does any cleanup that would prevent this instance from being eligible for garbage collection like cancelling scheduled repeated tasks or callingcleanup
on "owned" cleanupable objects.boolean
equals(Object o)
Optional<ChannelCategory>
getCategory()
String
getMentionTag()
MessageCache
getMessageCache()
int
getSlowmodeDelayInSeconds()
String
getTopic()
int
hashCode()
boolean
isNsfw()
void
setNsfwFlag(boolean nsfw)
Sets the nsfw flag.void
setParentId(long parentId)
Sets the parent id of the channel.void
setSlowmodeDelayInSeconds(int delay)
Sets the slowmode delay of the channel.void
setTopic(String topic)
Sets the topic of the channel.String
toString()
-
Methods inherited from interface org.javacord.api.entity.channel.Channel
asCategorizable, asChannelCategory, asGroupChannel, asPrivateChannel, asServerChannel, asServerTextChannel, asServerVoiceChannel, asTextChannel, asVoiceChannel, canSee, canYouSee
-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getCreationTimestamp, getId, getIdAsString
-
Methods inherited from interface org.javacord.core.listener.channel.InternalChannelAttachableListenerManager
addChannelAttachableListener, getChannelAttachableListeners, removeChannelAttachableListener, removeListener
-
Methods inherited from interface org.javacord.core.listener.channel.server.InternalServerChannelAttachableListenerManager
addServerChannelAttachableListener, addServerChannelChangeNameListener, addServerChannelChangeOverwrittenPermissionsListener, addServerChannelChangePositionListener, addServerChannelDeleteListener, getServerChannelAttachableListeners, getServerChannelChangeNameListeners, getServerChannelChangeOverwrittenPermissionsListeners, getServerChannelChangePositionListeners, getServerChannelDeleteListeners, removeListener, removeServerChannelAttachableListener
-
Methods inherited from interface org.javacord.core.listener.channel.server.text.InternalServerTextChannelAttachableListenerManager
addServerChannelChangeNsfwFlagListener, addServerTextChannelAttachableListener, addServerTextChannelChangeSlowmodeListener, addServerTextChannelChangeTopicListener, addWebhooksUpdateListener, getApi, getId, getServerChannelChangeNsfwFlagListeners, getServerTextChannelAttachableListeners, getServerTextChannelChangeSlowmodeListeners, getServerTextChannelChangeTopicListeners, getWebhooksUpdateListeners, removeListener, removeServerTextChannelAttachableListener
-
Methods inherited from interface org.javacord.core.entity.channel.InternalTextChannel
bulkDelete, getMessageById, getMessages, getMessagesAfter, getMessagesAfterAsStream, getMessagesAfterUntil, getMessagesAfterWhile, getMessagesAround, getMessagesAroundAsStream, getMessagesAroundUntil, getMessagesAroundWhile, getMessagesAsStream, getMessagesBefore, getMessagesBeforeAsStream, getMessagesBeforeUntil, getMessagesBeforeWhile, getMessagesBetween, getMessagesBetweenAsStream, getMessagesBetweenUntil, getMessagesBetweenWhile, getMessagesUntil, getMessagesWhile, getPins, getWebhooks, type
-
Methods inherited from interface org.javacord.core.listener.channel.InternalTextChannelAttachableListenerManager
addCachedMessagePinListener, addCachedMessageUnpinListener, addChannelPinsUpdateListener, addMessageCreateListener, addMessageDeleteListener, addMessageEditListener, addReactionAddListener, addReactionRemoveAllListener, addReactionRemoveListener, addTextChannelAttachableListener, addUserStartTypingListener, getCachedMessagePinListeners, getCachedMessageUnpinListeners, getChannelPinsUpdateListeners, getMessageCreateListeners, getMessageDeleteListeners, getMessageEditListeners, getReactionAddListeners, getReactionRemoveAllListeners, getReactionRemoveListeners, getTextChannelAttachableListeners, getUserStartTypingListeners, removeListener, removeTextChannelAttachableListener
-
Methods inherited from interface org.javacord.api.entity.message.Messageable
sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.javacord.api.entity.channel.ServerChannel
canCreateInstantInvite, canYouCreateInstantInvite, compareTo, createInviteBuilder, delete, delete, getEffectiveAllowedPermissions, getEffectiveDeniedPermissions, getEffectiveOverwrittenPermissions, getEffectivePermissions, getInvites, getOverwrittenPermissions, getOverwrittenPermissions, getOverwrittenRolePermissions, getOverwrittenUserPermissions, getPosition, getRawPosition, getServer, hasAnyPermission, hasPermission, hasPermissions, updateName, updateRawPosition
-
Methods inherited from class org.javacord.core.entity.channel.ServerChannelImpl
delete, getApi, getEffectiveOverwrittenPermissions, getId, getInternalOverwrittenRolePermissions, getInternalOverwrittenUserPermissions, getInvites, getName, getOverwrittenPermissions, getOverwrittenRolePermissions, getOverwrittenUserPermissions, getRawPosition, getServer, setName, setPosition
-
Methods inherited from interface org.javacord.api.entity.channel.ServerTextChannel
createUpdater, createWebhookBuilder, getCurrentCachedInstance, getLatestInstance, getType, hasSlowmode, removeCategory, unsetSlowmode, updateCategory, updateNsfwFlag, updateSlowmodeDelayInSeconds, updateTopic
-
Methods inherited from interface org.javacord.api.entity.channel.TextChannel
bulkDelete, bulkDelete, bulkDelete, canAddNewReactions, canAttachFiles, canEmbedLinks, canManageMessages, canMentionEveryone, canReadMessageHistory, canRemoveReactionsOfOthers, canUseExternalEmojis, canUseTts, canWrite, canYouAddNewReactions, canYouAttachFiles, canYouEmbedLinks, canYouManageMessages, canYouMentionEveryone, canYouReadMessageHistory, canYouRemoveReactionsOfOthers, canYouUseExternalEmojis, canYouUseTts, canYouWrite, deleteMessages, deleteMessages, deleteMessages, deleteMessages, getMessageById, getMessagesAfter, getMessagesAfterAsStream, getMessagesAfterUntil, getMessagesAfterWhile, getMessagesAround, getMessagesAroundAsStream, getMessagesAroundUntil, getMessagesAroundWhile, getMessagesBefore, getMessagesBeforeAsStream, getMessagesBeforeUntil, getMessagesBeforeWhile, getMessagesBetween, getMessagesBetweenAsStream, getMessagesBetweenUntil, getMessagesBetweenWhile, typeContinuously, typeContinuously, typeContinuouslyAfter, typeContinuouslyAfter
-
-
-
-
Constructor Detail
-
ServerTextChannelImpl
public ServerTextChannelImpl(DiscordApiImpl api, ServerImpl server, com.fasterxml.jackson.databind.JsonNode data)
Creates a new server text channel object.- Parameters:
api
- The discord api instance.server
- The server of the channel.data
- The json data of the channel.
-
-
Method Detail
-
setTopic
public void setTopic(String topic)
Sets the topic of the channel.- Parameters:
topic
- The new topic of the channel.
-
setNsfwFlag
public void setNsfwFlag(boolean nsfw)
Sets the nsfw flag.- Parameters:
nsfw
- The nsfw flag.
-
setParentId
public void setParentId(long parentId)
Sets the parent id of the channel.- Parameters:
parentId
- The parent id to set.
-
setSlowmodeDelayInSeconds
public void setSlowmodeDelayInSeconds(int delay)
Sets the slowmode delay of the channel.- Parameters:
delay
- The delay in seconds.
-
getSlowmodeDelayInSeconds
public int getSlowmodeDelayInSeconds()
- Specified by:
getSlowmodeDelayInSeconds
in interfaceServerTextChannel
-
isNsfw
public boolean isNsfw()
- Specified by:
isNsfw
in interfaceServerTextChannel
-
getCategory
public Optional<ChannelCategory> getCategory()
- Specified by:
getCategory
in interfaceCategorizable
-
getTopic
public String getTopic()
- Specified by:
getTopic
in interfaceServerTextChannel
-
getMessageCache
public MessageCache getMessageCache()
- Specified by:
getMessageCache
in interfaceTextChannel
-
getMentionTag
public String getMentionTag()
- Specified by:
getMentionTag
in interfaceMentionable
-
cleanup
public void cleanup()
Description copied from interface:Cleanupable
Does any cleanup that would prevent this instance from being eligible for garbage collection like cancelling scheduled repeated tasks or callingcleanup
on "owned" cleanupable objects. This method has to be thread-safe and idempotent.- Specified by:
cleanup
in interfaceCleanupable
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classServerChannelImpl
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classServerChannelImpl
-
toString
public String toString()
- Overrides:
toString
in classServerChannelImpl
-
-