Skip to content

频道 (Channel) ​

TIP

消歧义:本节介绍跨平台协议中的频道对象。

类型定义 ​

ts
export interface Channel {
  id: string
  name: string
}

API ​

bot.getChannel(channelId) ​

  • channelId: string 频道 ID
  • 返回值: Promise<Channel> 频道信息

获取频道信息。

bot.getChannelList(guildId, next?) ​

  • guildId: string 群组 ID
  • next: string 分页令牌
  • 返回值: Promise<List<Channel>> 频道列表

获取某个群组的频道列表。

bot.getChannelIter(guildId) 内置 ​

  • guildId: string 群组 ID
  • 返回值: AsyncIterable<Channel> 异步迭代器

获取某个群组的频道列表的异步迭代器。