获取频道列表

获取当前用户下的所有频道列表,频道用Guild描述。

使用示例

  1. async function demo() {
  2. let { data } = await client.meApi.meGuilds(options);
  3. }

参数说明

字段名 必填 类型 描述
options ReqOptions 获取频道列表范围

ReqOptions

字段名 必填 类型 描述
before string 读取此 id 之前的数据
after string 读取此 id 之后的数据
limit number 每次拉取多少条数据,最大不超过 100,默认 100

::: warning 注意

before、after 同时存在时,以 before 为准。

:::

返回说明

返回 Guild 数组。

Guild

字段名 类型 描述
id string 频道 ID
name string 频道名称
icon string 频道头像地址
owner boolean 当前人是否是创建人

返回示例

data

  1. [
  2. {
  3. id: 'xxxxxx',
  4. name: 'Ost测试频道',
  5. icon: 'xxxxxx',
  6. owner: false,
  7. },
  8. ];