mirai-js 2.6.2 → 2.7.1-0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/mirai-js.js +1 -1
- package/dist/node/Bot.d.ts +1 -1
- package/dist/node/Bot.js +17 -5
- package/dist/node/FileManager.js +6 -2
- package/dist/node/Middleware.d.ts +4 -4
- package/dist/node/core/anno/deleteAnno.js +5 -1
- package/dist/node/core/anno/getAnno.js +5 -1
- package/dist/node/core/anno/publishAnno.js +5 -1
- package/dist/node/core/auth.js +5 -1
- package/dist/node/core/fs/deleteGroupFile.js +5 -1
- package/dist/node/core/fs/getGroupFileInfo.js +5 -1
- package/dist/node/core/fs/getGroupFileList.js +5 -1
- package/dist/node/core/fs/makeGroupDir.js +5 -1
- package/dist/node/core/fs/moveGroupFile.js +5 -1
- package/dist/node/core/fs/renameGroupFile.js +5 -1
- package/dist/node/core/fs/uploadGroupFIle.js +5 -1
- package/dist/node/core/getFriendList.js +5 -1
- package/dist/node/core/getGroupConfig.js +5 -1
- package/dist/node/core/getGroupList.js +5 -1
- package/dist/node/core/getMemberInfo.js +5 -1
- package/dist/node/core/getMemberList.js +5 -1
- package/dist/node/core/getSessionConfig.js +5 -1
- package/dist/node/core/getUserProfile.js +5 -1
- package/dist/node/core/mute.js +5 -1
- package/dist/node/core/muteAll.js +5 -1
- package/dist/node/core/quitGroup.js +5 -1
- package/dist/node/core/recall.js +5 -1
- package/dist/node/core/releaseSession.js +5 -1
- package/dist/node/core/removeFriend.js +5 -1
- package/dist/node/core/removeMember.js +5 -1
- package/dist/node/core/responseBotInvitedJoinGroupRequest.js +5 -1
- package/dist/node/core/responseFirendRequest.js +5 -1
- package/dist/node/core/responseMemberJoinRequest.js +5 -1
- package/dist/node/core/sendCommand.js +5 -1
- package/dist/node/core/sendFriendMessage.js +5 -1
- package/dist/node/core/sendGroupMessage.js +5 -1
- package/dist/node/core/sendNudge.js +5 -1
- package/dist/node/core/sendTempMessage.js +5 -1
- package/dist/node/core/setEssence.js +5 -1
- package/dist/node/core/setGroupConfig.js +5 -1
- package/dist/node/core/setMemberAdmin.js +5 -1
- package/dist/node/core/setMemberInfo.js +5 -1
- package/dist/node/core/setSessionConfig.js +5 -1
- package/dist/node/core/startListeningBrowser.js +5 -1
- package/dist/node/core/startListeningNode.js +5 -1
- package/dist/node/core/stopListeningBrowser.js +5 -1
- package/dist/node/core/stopListeningNode.js +5 -1
- package/dist/node/core/unmute.js +5 -1
- package/dist/node/core/unmuteAll.js +5 -1
- package/dist/node/core/uploadImage.js +5 -1
- package/dist/node/core/uploadVoice.js +5 -1
- package/dist/node/core/verify.js +5 -1
- package/dist/node/index.d.ts +8 -3
- package/dist/node/index.js +12 -9
- package/dist/node/polyfill/URL.js +5 -1
- package/dist/node/polyfill/wsListener.js +6 -2
- package/dist/node/util/isBrowserEnv.js +5 -0
- package/package.json +2 -2
- package/src/Bot.d.ts +1 -1
- package/src/Bot.js +5 -2
- package/src/FileManager.js +3 -2
- package/src/Middleware.d.ts +4 -4
- package/src/core/anno/deleteAnno.js +2 -1
- package/src/core/anno/getAnno.js +2 -1
- package/src/core/anno/publishAnno.js +2 -1
- package/src/core/auth.js +2 -1
- package/src/core/fs/deleteGroupFile.js +2 -1
- package/src/core/fs/getGroupFileInfo.js +2 -1
- package/src/core/fs/getGroupFileList.js +2 -1
- package/src/core/fs/makeGroupDir.js +2 -1
- package/src/core/fs/moveGroupFile.js +2 -1
- package/src/core/fs/renameGroupFile.js +2 -1
- package/src/core/fs/uploadGroupFIle.js +2 -1
- package/src/core/getFriendList.js +2 -1
- package/src/core/getGroupConfig.js +2 -1
- package/src/core/getGroupList.js +2 -1
- package/src/core/getMemberInfo.js +2 -1
- package/src/core/getMemberList.js +2 -1
- package/src/core/getSessionConfig.js +2 -1
- package/src/core/getUserProfile.js +2 -1
- package/src/core/mute.js +2 -1
- package/src/core/muteAll.js +2 -1
- package/src/core/quitGroup.js +2 -1
- package/src/core/recall.js +2 -1
- package/src/core/releaseSession.js +2 -1
- package/src/core/removeFriend.js +2 -1
- package/src/core/removeMember.js +2 -1
- package/src/core/responseBotInvitedJoinGroupRequest.js +2 -1
- package/src/core/responseFirendRequest.js +2 -1
- package/src/core/responseMemberJoinRequest.js +2 -1
- package/src/core/sendCommand.js +2 -1
- package/src/core/sendFriendMessage.js +2 -1
- package/src/core/sendGroupMessage.js +2 -1
- package/src/core/sendNudge.js +2 -1
- package/src/core/sendTempMessage.js +2 -1
- package/src/core/setEssence.js +2 -1
- package/src/core/setGroupConfig.js +2 -1
- package/src/core/setMemberAdmin.js +2 -1
- package/src/core/setMemberInfo.js +2 -1
- package/src/core/setSessionConfig.js +2 -1
- package/src/core/startListeningBrowser.js +2 -1
- package/src/core/startListeningNode.js +2 -1
- package/src/core/stopListeningBrowser.js +2 -1
- package/src/core/stopListeningNode.js +2 -1
- package/src/core/unmute.js +2 -1
- package/src/core/unmuteAll.js +2 -1
- package/src/core/uploadImage.js +2 -1
- package/src/core/uploadVoice.js +2 -1
- package/src/core/verify.js +2 -1
- package/src/index.d.ts +8 -3
- package/src/index.js +13 -9
- package/src/polyfill/URL.js +3 -1
- package/src/polyfill/wsListener.js +4 -2
- package/src/util/isBrowserEnv.js +3 -0
package/dist/node/core/auth.js
CHANGED
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
*
|
20
24
|
* @description 认证 verifyKey,创建回话,返回一个 sessionKey
|
@@ -14,7 +14,11 @@ const errorHandler = require('../../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 删除群文件
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 获取群文件详细信息
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 获取群文件列表
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 新建群文件夹
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 移动群文件
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 重命名群文件
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
|
19
23
|
const FormData = require('form-data');
|
20
24
|
/**
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 获取好友列表
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 获取群配置
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 获取群列表
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 获取群成员信息
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 获取指定群的成员列表
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 获取指定 session 的 config
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 获取用户信息
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
package/dist/node/core/mute.js
CHANGED
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 禁言群成员
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的主机地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 全员禁言
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的主机地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 退出群聊
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
package/dist/node/core/recall.js
CHANGED
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 撤回由 messageId 确定的消息
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的主机地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 关闭一个会话
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的主机地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 删除好友
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 移除群成员
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* ! 自动同意时,不会触发该事件
|
20
24
|
* @description 响应机器人被邀请入群请求
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 响应好友请求
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* FIXME: mirai-core 的问题,有时候收不到 MemberJoinRequestEvent 事件
|
20
24
|
* 该功能未经测试
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 向 mirai-console 发送指令
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 向 qq 好友发送消息
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 向 qq 群发送消息
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 发送戳一戳消息
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 向临时对象发送消息
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 设置群精华消息
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 设置群配置
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 设置群成员权限
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 设置群成员信息
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 设置指定 session 的 config
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -10,7 +10,11 @@ const errorHandler = require('../util/errorHandler');
|
|
10
10
|
|
11
11
|
const path = require('path');
|
12
12
|
|
13
|
-
const
|
13
|
+
const {
|
14
|
+
isBrowserEnv
|
15
|
+
} = require('../util/isBrowserEnv');
|
16
|
+
|
17
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
14
18
|
/**
|
15
19
|
* @description 开始侦听事件
|
16
20
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -10,7 +10,11 @@ const errorHandler = require('../util/errorHandler');
|
|
10
10
|
|
11
11
|
const path = require('path');
|
12
12
|
|
13
|
-
const
|
13
|
+
const {
|
14
|
+
isBrowserEnv
|
15
|
+
} = require('../util/isBrowserEnv');
|
16
|
+
|
17
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
14
18
|
/**
|
15
19
|
* @description 开始侦听事件
|
16
20
|
* @param {string} baseUrl mirai-api-http server 的地址
|
@@ -4,7 +4,11 @@ const errorHandler = require('../util/errorHandler');
|
|
4
4
|
|
5
5
|
const path = require('path');
|
6
6
|
|
7
|
-
const
|
7
|
+
const {
|
8
|
+
isBrowserEnv
|
9
|
+
} = require('../util/isBrowserEnv');
|
10
|
+
|
11
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
8
12
|
/**
|
9
13
|
* @description 停止侦听事件
|
10
14
|
* @param {WebSocket} 建立连接的 WebSocket 实例
|
@@ -4,7 +4,11 @@ const errorHandler = require('../util/errorHandler');
|
|
4
4
|
|
5
5
|
const path = require('path');
|
6
6
|
|
7
|
-
const
|
7
|
+
const {
|
8
|
+
isBrowserEnv
|
9
|
+
} = require('../util/isBrowserEnv');
|
10
|
+
|
11
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
8
12
|
/**
|
9
13
|
* @description 停止侦听事件
|
10
14
|
* @param {WebSocket} 建立连接的 WebSocket 实例
|
package/dist/node/core/unmute.js
CHANGED
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 解除禁言
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的主机地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 解除全员禁言
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的主机地址
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
|
19
23
|
const FormData = require('form-data');
|
20
24
|
/**
|
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
|
19
23
|
const FormData = require('form-data');
|
20
24
|
/**
|
package/dist/node/core/verify.js
CHANGED
@@ -14,7 +14,11 @@ const errorHandler = require('../util/errorHandler');
|
|
14
14
|
|
15
15
|
const path = require('path');
|
16
16
|
|
17
|
-
const
|
17
|
+
const {
|
18
|
+
isBrowserEnv
|
19
|
+
} = require('../util/isBrowserEnv');
|
20
|
+
|
21
|
+
const locationStr = !isBrowserEnv() ? `core.${path.basename(__filename, path.extname(__filename))}` : 'borwser';
|
18
22
|
/**
|
19
23
|
* @description 校验 sessionKey,将一个 session 绑定到指定的 qq 上
|
20
24
|
* @param {string} baseUrl mirai-api-http server 的地址
|
package/dist/node/index.d.ts
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
import { Bot as BotType } from './Bot';
|
2
|
+
import { Message as MessageType } from './Message';
|
3
|
+
import { Middleware as MiddlewareType } from './Middleware';
|
4
|
+
declare module 'mirai-js' {
|
5
|
+
export const Bot: typeof BotType;
|
6
|
+
export const Message: typeof MessageType;
|
7
|
+
export const Middleware: typeof MiddlewareType;
|
8
|
+
}
|