channel

package
v0.0.0-...-8fd61c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: BSD-3-Clause Imports: 4 Imported by: 73

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Id       uint64 `json:",string"`
	Filename string `json:"filename"`
	Size     int    `json:"size"`
	Url      string `json:"url"`
	ProxyUrl string `json:"proxy_url"`
	Height   int    `json:"height"`
	Width    int    `json:"width"`
}

type CachedChannel

type CachedChannel struct {
	GuildId              uint64                    `json:"-"`
	Type                 ChannelType               `json:"type"`
	Position             int                       `json:"position"`
	PermissionOverwrites []PermissionOverwrite     `json:"permission_overwrites"`
	Name                 string                    `json:"name"`
	Topic                string                    `json:"topic"`
	Nsfw                 bool                      `json:"nsfw"`
	LastMessageId        objects.NullableSnowflake `json:"last_message_id"`
	Bitrate              int                       `json:"bitrate"`
	UserLimit            int                       `json:"user_limit"`
	RateLimitPerUser     int                       `json:"rate_limit_per_user"`
	Icon                 string                    `json:"icon"`
	OwnerId              uint64                    `json:"owner_id,string"`
	ApplicationId        uint64                    `json:"application_id"`
	ParentId             objects.NullableSnowflake `json:"parent_id,omitempty"`
	LastPinTimestamp     time.Time                 `json:"last_pin_timestamp"`
}

func (*CachedChannel) ToChannel

func (c *CachedChannel) ToChannel(channelId, guildId uint64) Channel

type Channel

type Channel struct {
	Id                   uint64                    `json:"id,string"`
	Type                 ChannelType               `json:"type"`
	GuildId              uint64                    `json:"guild_id,string"`
	Position             int                       `json:"position"`
	PermissionOverwrites []PermissionOverwrite     `json:"permission_overwrites"`
	Name                 string                    `json:"name"`
	Topic                string                    `json:"topic"`
	Nsfw                 bool                      `json:"nsfw"`
	LastMessageId        objects.NullableSnowflake `json:"last_message_id"`
	Bitrate              int                       `json:"bitrate"`
	UserLimit            int                       `json:"user_limit"`
	RateLimitPerUser     int                       `json:"rate_limit_per_user"`
	Recipients           []user.User               `json:"recipients"`
	Icon                 string                    `json:"icon"`
	OwnerId              uint64                    `json:"owner_id,string"` // Owner of a group DM
	ApplicationId        uint64                    `json:"application_id,string"`
	ParentId             objects.NullableSnowflake `json:"parent_id,omitempty"`
	LastPinTimestamp     time.Time                 `json:"last_pin_timestamp"`
	RtcRegion            *string                   `json:"rtc_region"`
	VideoQualityMode     VideoQualityMode          `json:"video_quality_mode"`
	MessageCount         uint64                    `json:"message_count"`
	MemberCount          uint64                    `json:"member_count"`
	ThreadMetadata       *ThreadMetadata           `json:"thread_metadata,omitempty"`
	Member               ThreadMember              `json:"member"`
}

func (*Channel) Mention

func (c *Channel) Mention() string

func (*Channel) ToCachedChannel

func (c *Channel) ToCachedChannel() CachedChannel

func (*Channel) ToPartialChannel

func (c *Channel) ToPartialChannel() PartialChannel

type ChannelType

type ChannelType int
const (
	ChannelTypeGuildText ChannelType = iota
	ChannelTypeDM
	ChannelTypeGuildVoice
	ChannelTypeGroupDM
	ChannelTypeGuildCategory
	ChannelTypeGuildNews
	ChannelTypeGuildStore
	ChannelTypeGuildNewsThread ChannelType = iota + 3
	ChannelTypeGuildPublicThread
	ChannelTypeGuildPrivateThread
	ChannelTypeGuildStageVoice
	ChannelTypeGuildDirectory
	ChannelTypeGuildForum
)

type PartialChannel

type PartialChannel struct {
	Id               uint64                    `json:"id,string"`
	Type             ChannelType               `json:"type"`
	GuildId          uint64                    `json:"guild_id,string"`
	Position         int                       `json:"position"`
	Name             string                    `json:"name"`
	Topic            string                    `json:"topic"`
	Nsfw             bool                      `json:"nsfw"`
	LastMessageId    objects.NullableSnowflake `json:"last_message_id"`
	ParentId         objects.NullableSnowflake `json:"parent_id,omitempty"`
	LastPinTimestamp time.Time                 `json:"last_pin_timestamp"`
}

type PermissionOverwrite

type PermissionOverwrite struct {
	Id    uint64                  `json:"id,string,omitempty"`
	Type  PermissionOverwriteType `json:"type"`
	Allow uint64                  `json:"allow,string"`
	Deny  uint64                  `json:"deny,string"`
}

type PermissionOverwriteType

type PermissionOverwriteType int
const (
	PermissionTypeRole PermissionOverwriteType = iota
	PermissionTypeMember
)

type ThreadMember

type ThreadMember struct {
	ThreadId      uint64    `json:"id,string"`
	UserId        uint64    `json:"user_id,string"`
	JoinTimestamp time.Time `json:"join_timestamp"`
	Flags         uint      `json:"flags"`
}

type ThreadMetadata

type ThreadMetadata struct {
	Archived            bool       `json:"archived"`
	AutoArchiveDuration uint16     `json:"auto_archive_duration"`
	ArchiveTimestamp    time.Time  `json:"archive_timestamp"`
	Locked              bool       `json:"locked"`
	Invitable           *bool      `json:"invitable,omitempty"`
	CreateTimestamp     *time.Time `json:"create_timestamp,omitempty"`
}

type VideoQualityMode

type VideoQualityMode uint8
const (
	VideoQualityModeAuto VideoQualityMode = iota + 1
	VideoQualityModeFull
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL