struct Servo::Model::Channel

Overview

Represents a Channel.

Included Modules

Defined in:

model/channel/channel.cr

Constructors

Instance Method Summary

Instance methods inherited from module Servo::Model::Identifiable

created_at : Time created_at, id : Servo::Model::Snowflake id

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def application_id : Servo::Model::Snowflake | Nil #

[View source]
def bitrate : UInt32 | Nil #

The bitrate of the voice channel.


[View source]
def default_auto_archive_duration : Servo::Model::ThreadAutoArchiveDuration | Nil #

[View source]
def guild_id : Servo::Model::Snowflake | Nil #

[View source]
def icon : String | Nil #

The icon hash of the group DM.


[View source]
def last_message_id : Servo::Model::Snowflake | Nil #

[View source]
def last_pin_timestamp : Time | Nil #

[View source]
def member : Servo::Model::ThreadMember | Nil #

Thread member object for the current user, if they have joined the thread.


[View source]
def member_count : UInt8 | Nil #

An approximate count of users in a thread, stops at 50.


[View source]
def message_count : UInt8 | Nil #

An approximate count of messages in a thread, stops at 50.


[View source]
def name : String | Nil #

The name of this channel.

Must be 1-100 characters.


[View source]
def nsfw : Bool | Nil #

Whether the channel is NSFW.


[View source]
def owner_id : Servo::Model::Snowflake | Nil #

[View source]
def parent_id : Servo::Model::Snowflake | Nil #

[View source]
def permission_overwrites : Array(Servo::Model::PermissionOverwrite) | Nil #

Array of explicit Servo::Model::PermissionOverwrite for members and roles.


[View source]
def permissions : Servo::Model::Permissions | Nil #

[View source]
def position : Int32 | Nil #

The sorting position of the channel.


[View source]
def rate_limit_per_user : UInt32 | Nil #

The amount of seconds a user has to wait before sending another message.

This value must between 0 and 21600. Bots as well as users with MANAGE_MESSAGES, or MANAGE_CHANNEL permissions are unnaffected.


[View source]
def recipients : Array(Servo::Model::User) | Nil #

The recipients of the DM.


[View source]
def rtc_region : String | Nil #

Voice Region ID for the voice channel.

Automatic when set to nil.


[View source]
def thread_metadata : Servo::Model::ThreadMetadata | Nil #

Thread specific fields not needed by other channels.


[View source]
def topic : String | Nil #

The channel topic.

Must be 0-1024 characters.


[View source]
def type : ChannelType #

The type of this channel.


[View source]
def user_limit : UInt32 | Nil #

The user limit of the voice channel.


[View source]
def video_quality_mode : VideoQualityMode | Nil #

The camera video quality mode of the voice channel.

Automatic when set to nil.


[View source]