CacheableTextChannel<S extends TextChannel> class
Lightweight channel which implements cacheable and allows to perform basic operation on channel instance
- Inheritance
-
- Object
- SnowflakeEntity
- IChannel
- CacheableTextChannel
- Implemented types
Properties
- channelType ↔ ChannelType
-
Type of this channel
latefinalinherited
- client → INyxx
-
Reference to client
finalinherited
- createdAt → DateTime
-
Gets creation timestamp included in Snowflake
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → Snowflake
-
ID of entity as Snowflake
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bulkRemoveMessages(
Iterable< SnowflakeEntity> messages) → Future<void> -
Bulk removes many messages by its ids.
messages
is list of messages ids to delete.override -
delete(
) → Future< void> -
Deletes channel if guild channel or closes DM if DM channel
override
-
dispose(
) → Future< void> -
Perform cleanup
override
-
download(
) → Future< S> -
Downloads entity from cache and caches result
override
-
downloadMessages(
{int limit = 50, Snowflake? after, Snowflake? around, Snowflake? before}) → Stream< Message> -
Gets several
Message
objects from API. Only one ofafter
,before
,around
can be specified, otherwise, it will throw.override -
fetchMessage(
Snowflake id) → Future< Message> -
Returns
Message
downloaded from APIoverride -
fetchPinnedMessages(
) → Stream< Message> -
Returns pinned
Message
s for channel.override -
getFromCache(
) → S? -
Returns entity from cache or null if not present
override
-
getMessage(
Snowflake id) → Message? -
Returns always null since this type of channel doesn't have cache.
override
-
getOrDownload(
) → FutureOr< S> -
Returns entity from cache or tries to download from API if not found.
If downloading is successful it caches results
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendMessage(
MessageBuilder builder) → Future< Message> -
Sends message to channel. Performs
toString()
on thing passed tocontent
. Allows to send embeds withembed
field.override -
startTyping(
) → Future< void> -
Starts typing.
override
-
startTypingLoop(
) → void -
Loops
startTyping
untilstopTypingLoop
is called.override -
stopTypingLoop(
) → void -
Stops a typing loop if one is running.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator.
inherited