ChannelInfo

data class ChannelInfo @ApiResultType constructor(val id: String, val name: String, val isCategory: Boolean, val userId: String, val parentId: String, val level: Int, val type: Int, val limitAmount: Int, val guildId: String = "", val topic: String = "", val slowMode: Int = 0, val permissionOverwrites: List<PermissionOverwrite> = emptyList(), val permissionSync: Int = 0, val hasPassword: Boolean = false)(source)

Api GetChannelListApi 的响应体。

Constructors

Link copied to clipboard
constructor(id: String, name: String, isCategory: Boolean, userId: String, parentId: String, level: Int, type: Int, limitAmount: Int, guildId: String = "", topic: String = "", slowMode: Int = 0, permissionOverwrites: List<PermissionOverwrite> = emptyList(), permissionSync: Int = 0, hasPassword: Boolean = false)

Properties

Link copied to clipboard
@SerialName(value = "guild_id")
val guildId: String
Link copied to clipboard
@SerialName(value = "has_password")
val hasPassword: Boolean = false
Link copied to clipboard
val id: String

频道id

Link copied to clipboard
@SerialName(value = "is_category")
val isCategory: Boolean

是否为分组类型

Link copied to clipboard
val level: Int

频道排序

Link copied to clipboard
@SerialName(value = "limit_amount")
val limitAmount: Int

人数限制

Link copied to clipboard

频道名称

Link copied to clipboard
@SerialName(value = "parent_id")
val parentId: String

父分组频道id

Link copied to clipboard
@SerialName(value = "permission_overwrites")
val permissionOverwrites: List<PermissionOverwrite>
Link copied to clipboard
@SerialName(value = "permission_sync")
val permissionSync: Int = 0
Link copied to clipboard
@SerialName(value = "slow_mode")
val slowMode: Int = 0

慢速模式。单位为秒。

Link copied to clipboard

主题

Link copied to clipboard
val type: Int

频道类型

Link copied to clipboard
@SerialName(value = "user_id")
val userId: String

频道创建者id

Inherited functions

Link copied to clipboard
fun ChannelInfo.toChannel(guildId: String = this.guildId, topic: String = this.topic, slowMode: Int = this.slowMode, permissionOverwrites: List<PermissionOverwrite> = this.permissionOverwrites, permissionUsers: List<PermissionUser> = emptyList(), permissionSync: Int = this.permissionSync, hasPassword: Boolean = this.hasPassword): Channel

ChannelInfo 转化为 Channel 类型, 并可选的提供一些缺失字段的默认值。