generated from zhinjs/qq-official-bot
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
486 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# 子频道 | ||
## 获取频道列表 | ||
- getChannelList | ||
- 将返回 [Channel](https://client.q.qq.com/wiki/develop/api-v2/server-inter/channel/manage/channel/model.html#channel)对象 | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述| | ||
|-----|----|------|----| | ||
| guild_id|string|是|服务器id| | ||
## Channel.Info | ||
```typescript | ||
export interface Info { | ||
/** | ||
* 频道id | ||
*/ | ||
id: string | ||
/** | ||
* 创建者id | ||
*/ | ||
user_id: string | ||
/** | ||
* 频道名称 | ||
*/ | ||
/** | ||
* 父分组频道id | ||
*/ | ||
parent_id?: string | ||
name: string | ||
/** | ||
* 频道类型 | ||
*/ | ||
type: ChannelType | ||
/** | ||
* 频道排序 | ||
*/ | ||
level: number | ||
/** | ||
* 人数限制 | ||
*/ | ||
limit_account: number | ||
is_category?: boolean | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# 客户端(Client) | ||
## 获取机器人信息 | ||
- getSelfInfo():Promise\<[User.Info](./user.md#user-info)[]> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述| | ||
|-----|----|------|----| | ||
## 机器人上线 | ||
- setOnline():Promise\<boolean> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述| | ||
|-----|----|------|----| | ||
## 机器人下线 | ||
- setOffline():Promise\<boolean> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述| | ||
|-----|----|------|----| | ||
## 获取在线状态 | ||
- getOnlineStatus():Promise\<{online:boolean,online_os:string[]}> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述| | ||
|-----|----|------|----| | ||
## 获取机器人加入的服务器列表 | ||
- getGuildList():Promise\<[Guild.Info](./guild.md#guild-info)[]> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述| | ||
|-----|----|------|----| | ||
## 获取指定服务器详情 | ||
- getGuildList(guild_id):Promise\<[Guild.Info](./guild.md#guild-info)> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|-----|----|------|-------| | ||
| guild_id|string|true| 服务器id | | ||
## 获取指定服务器频道列表 | ||
- getChannelList(guild_id):Promise\<[Channel.Info](./channel.md#channel-info)[]> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|-----|----|------|-------| | ||
| guild_id|string|true| 服务器id | | ||
## 获取指定服务器成员列表 | ||
- getGuildUserList(guild_id,channel_id?):Promise\<[User.Info](./user.md#user-info)[]> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|------------|----|-------|--------------------| | ||
| guild_id |string| true | 服务器id | | ||
| channel_id |string| false | 频道id,传入则获取指定频道成员列表 | | ||
|
||
## 获取黑名单成员列表 | ||
- getGuildUserList(guild_id):Promise\<[Guild.BlackInfo](./guild.md#guild-blackinfo)[]> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|------------|----|-------|--------------------| | ||
| guild_id |string| true | 服务器id | | ||
## 发送私聊消息 | ||
- sendPrivateMsg(user_id,message,quote):Promise\<Message.Ret> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|---------|-----------|-------|------| | ||
| user_id | string | true | 用户id | | ||
| message | Sendable | true | 消息内容 | | ||
| quote | Quoteable | false | 引用内容 | | ||
## 发送频道消息 | ||
- sendChannelMsg(channel_id,message,quote):Promise\<Message.Ret> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|---------|-----------|-------|------| | ||
| channel_id | string | true | 频道id | | ||
| message | Sendable | true | 消息内容 | | ||
| quote | Quoteable | false | 引用内容 | | ||
## 获取私聊消息 | ||
- getPrivateMsg(channel_id,message_id):Promise\<Message> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|------------|-----------|-------|------| | ||
| user_id | string | true | 用户id | | ||
| message_id | string | true | 消息id | | ||
## 获取频道消息 | ||
- getChannelMsg(channel_id,message_id):Promise\<Message> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|------------|-----------|-------|------| | ||
| channel_id | string | true | 频道id | | ||
| message_id | string | true | 消息id | | ||
## 撤回私聊消息 | ||
- recallPrivateMsg(channel_id,message_id):Promise\<Message> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|------------|-----------|-------|------| | ||
| user_id | string | true | 用户id | | ||
| message_id | string | true | 消息id | | ||
## 撤回频道消息 | ||
- recallChannelMsg(channel_id,message_id):Promise\<Message> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|------------|-----------|-------|------| | ||
| channel_id | string | true | 频道id | | ||
| message_id | string | true | 消息id | | ||
## 获取私聊聊天历史 | ||
- getPrivateChatHistory(channel_id,message_id):Promise\<Message[]> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|------------|-----------|-------|------| | ||
| user_id | string | true | 用户id | | ||
| message_id | string | false | 消息id | | ||
## 获取频道聊天历史 | ||
- getChannelChatHistory(channel_id,message_id):Promise\<Message[]> | ||
|
||
| 参数名 | 类型 | 是否必填 | 描述 | | ||
|------------|-----------|-------|------| | ||
| channel_id | string | true | 频道id | | ||
| message_id | string | false | 消息id | | ||
|
||
|
Oops, something went wrong.