群组 (Guild)
类型定义
ts
export interface Guild {
id: string
name: string
}API
bot.getGuild(guildId)
- guildId:
string群组 ID - 返回值:
Promise<Guild>群组信息
获取群组信息。
bot.getGuildList(next?)
- next:
string分页令牌 - 返回值:
Promise<List<Guild>>群组列表
获取机器人加入的群组列表。
bot.getGuildIter() 内置
- 返回值:
AsyncIterable<Guild>异步迭代器
获取机器人加入的群组列表的异步迭代器。
bot.handleGuildRequest(messageId, approve, comment?)
- messageId:
string请求 ID - approve:
boolean是否通过请求 - comment:
string备注信息 - 返回值:
Promise<void>
处理来自群组的邀请。
Koishi