ChannelManager class
A manager for Channels.
- Inheritance
-
- Object
- ReadOnlyManager<
Channel> - ChannelManager
Constructors
-
ChannelManager(CacheConfig<
Channel> config, NyxxRest client, {required CacheConfig<StageInstance> stageInstanceConfig}) - Create a new ChannelManager.
Properties
-
cache
→ Cache<
Channel> -
The cache for this manager.
finalinherited
- client → NyxxRest
-
The client this manager belongs to.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stageInstanceCache
→ Cache<
StageInstance> -
final
Methods
-
addRecipient(
Snowflake channelId, Snowflake userId, DmRecipientBuilder builder) → Future< void> -
addThreadMember(
Snowflake id, Snowflake memberId) → Future< void> - Add a member to a thread.
-
createForumThread(
Snowflake id, ForumThreadBuilder builder) → Future< Thread> - Create a thread in a forum channel.
-
createInvite(
Snowflake id, InviteBuilder builder, {String? auditLogReason}) → Future< Invite> - Create an invite in a guild channel.
-
createStageInstance(
Snowflake channelId, StageInstanceBuilder builder, {String? auditLogReason}) → Future< StageInstance> - Start a stage instance in a channel.
-
createThread(
Snowflake id, ThreadBuilder builder) → Future< Thread> - Create a thread in a channel.
-
createThreadFromMessage(
Snowflake id, Snowflake messageId, ThreadFromMessageBuilder builder) → Future< Thread> - Create a thread from a message in a channel.
-
delete(
Snowflake id, {String? auditLogReason}) → Future< Channel> - Delete a guild channel or close a DM channel.
-
deletePermissionOverwrite(
Snowflake id, Snowflake permissionId) → Future< void> - Delete a permission overwrite in a channel.
-
deleteStageInstance(
Snowflake channelId, {String? auditLogReason}) → Future< void> - Delete the stage instance for a channel.
-
fetch(
Snowflake id) → Future< Channel> -
Fetch the item with the given
id
from the API.override -
fetchStageInstance(
Snowflake channelId) → Future< StageInstance> - Fetch the current stage instance for a channel.
-
fetchThreadMember(
Snowflake id, Snowflake memberId, {bool? withMember}) → Future< ThreadMember> - Fetch information about a member in a thread.
-
followChannel(
Snowflake id, Snowflake toFollow) → Future< FollowedChannel> - Add a channel to another channel's followers.
-
get(
Snowflake id) → Future< Channel> -
Get an item by its
id
from the cache if it exists, else fetch it from the API.inherited -
joinThread(
Snowflake id) → Future< void> - Add the current user to a thread.
-
leaveThread(
Snowflake id) → Future< void> - Remove the current user from a thread.
-
listInvites(
Snowflake id) → Future< List< InviteWithMetadata> > - List the invites in a guild channel.
-
listJoinedPrivateArchivedThreads(
Snowflake id, {DateTime? before, int? limit}) → Future< ThreadList> - List the private archived threads the current user has joined in a channel.
-
listPrivateArchivedThreads(
Snowflake id, {DateTime? before, int? limit}) → Future< ThreadList> - List the private archived threads in a channel.
-
listPublicArchivedThreads(
Snowflake id, {DateTime? before, int? limit}) → Future< ThreadList> - List the public archived threads in a channel.
-
listThreadMembers(
Snowflake id, {bool? withMembers, Snowflake? after, int? limit}) → Future< List< ThreadMember> > - List the members of a thread.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
Map< String, Object?> raw, {Snowflake? guildId}) → Channel -
Parse the
raw
data received from the API into an instance of the type of this manager.override -
parseAnnouncementThread(
Map< String, Object?> raw, {Snowflake? guildId}) → AnnouncementThread -
parseDefaultReaction(
Map< String, Object?> raw) → DefaultReaction -
parseDirectoryChannel(
Map< String, Object?> raw, {Snowflake? guildId}) → DirectoryChannel -
parseDmChannel(
Map< String, Object?> raw, {Snowflake? guildId}) → DmChannel -
parseFollowedChannel(
Map< String, Object?> raw) → FollowedChannel -
parseForumChannel(
Map< String, Object?> raw, {Snowflake? guildId}) → ForumChannel -
parseForumTag(
Map< String, Object?> raw) → ForumTag -
parseGroupDmChannel(
Map< String, Object?> raw, {Snowflake? guildId}) → GroupDmChannel -
parseGuildAnnouncementChannel(
Map< String, Object?> raw, {Snowflake? guildId}) → GuildAnnouncementChannel -
parseGuildCategory(
Map< String, Object?> raw, {Snowflake? guildId}) → GuildCategory -
parseGuildMediaChannel(
Map< String, Object?> raw, {Snowflake? guildId}) → GuildMediaChannel -
parseGuildStageChannel(
Map< String, Object?> raw, {Snowflake? guildId}) → GuildStageChannel -
parseGuildTextChannel(
Map< String, Object?> raw, {Snowflake? guildId}) → GuildTextChannel -
parseGuildVoiceChannel(
Map< String, Object?> raw, {Snowflake? guildId}) → GuildVoiceChannel -
parsePermissionOverwrite(
Map< String, Object?> raw) → PermissionOverwrite -
parsePrivateThread(
Map< String, Object?> raw, {Snowflake? guildId}) → PrivateThread -
parsePublicThread(
Map< String, Object?> raw, {Snowflake? guildId}) → PublicThread -
parseStageInstance(
Map< String, Object?> raw) → StageInstance -
Parse a StageInstance from
raw
. -
parseThreadList(
Map< String, Object?> raw, {Snowflake? guildId}) → ThreadList -
parseThreadMember(
Map< String, Object?> raw, {Snowflake? guildId}) → ThreadMember -
removeRecipient(
Snowflake channelId, Snowflake userId) → Future< void> -
removeThreadMember(
Snowflake id, Snowflake memberId) → Future< void> - Remove a member from a thread.
-
toString(
) → String -
A string representation of this object.
inherited
-
triggerTyping(
Snowflake channelId) → Future< void> - Trigger the typing indicator for the current user in a channel.
-
update(
Snowflake id, UpdateBuilder< Channel> builder, {String? auditLogReason}) → Future<Channel> -
Update a channel using the provided
builder
. -
updatePermissionOverwrite(
Snowflake id, PermissionOverwriteBuilder builder) → Future< void> - Update a permission overwrite in a channel.
-
updateStageInstance(
Snowflake channelId, StageInstanceUpdateBuilder builder, {String? auditLogReason}) → Future< StageInstance> - Update the stage instance for a channel.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
Snowflake id) → PartialChannel -
Return a partial instance of the entity with ID
id
containing no data.override