NAME
Discord::Client::Model::Channel - channel snapshots and REST operations
SYNOPSIS
# Use an ID-only channel reference without fetching details first.
my $channel = $bot->model(channel => {id => $channel_id});
my $sent = $channel->send('Hello');
DESCRIPTION
A channel snapshot. Inherits construction and data access from Discord::Client::Model. REST operations use its associated REST client.
METHODS
name
Returns the name or undef when absent.
is_obfuscated
Returns true when the snapshot has the CHANNEL_OBFUSCATED flag, and false when the bit is clear or flags is absent. A channel named ___hidden___ can be visible. Use this method to distinguish the placeholder from a real name.
On an obfuscated Gateway channel, permission_overwrites contains a placeholder denying VIEW_CHANNEL to @everyone. Use the full channel update sent when visibility returns for the channel's actual overwrites.
mention
Returns the channel mention string.
send
send(text_or_hash) returns a Future containing a new Discord::Client::Model::Message snapshot.
fetch_message
fetch_message(message_id) returns a Future containing a Message snapshot.
typing
Returns a Future resolving to undef after triggering the typing indicator.
refresh
Fetches current channel data and returns a Future containing a new Channel snapshot. The existing snapshot does not change.
LICENSE
Apache License 2.0.