woodenfish-bot 4.7.3 → 4.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +60 -62
- package/lib/index.js +60 -62
- package/package.json +1 -1
- package/typings/index.d.ts +123 -25
package/es/index.js
CHANGED
|
@@ -319,7 +319,7 @@ var Guild = /*#__PURE__*/function () {
|
|
|
319
319
|
}]);
|
|
320
320
|
}();
|
|
321
321
|
|
|
322
|
-
var version = "4.7.
|
|
322
|
+
var version = "4.7.5";
|
|
323
323
|
|
|
324
324
|
function getDefaultExportFromCjs (x) {
|
|
325
325
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -1270,11 +1270,7 @@ var Message = /*#__PURE__*/function () {
|
|
|
1270
1270
|
// 群组撤回消息
|
|
1271
1271
|
}, {
|
|
1272
1272
|
key: "deleteGroupMessage",
|
|
1273
|
-
value: function deleteGroupMessage(groupOpenid, messageID
|
|
1274
|
-
var params = Object.create(null);
|
|
1275
|
-
if (typeof hideTip === 'boolean') {
|
|
1276
|
-
params.hidetip = hideTip;
|
|
1277
|
-
}
|
|
1273
|
+
value: function deleteGroupMessage(groupOpenid, messageID) {
|
|
1278
1274
|
var options = {
|
|
1279
1275
|
method: 'DELETE',
|
|
1280
1276
|
url: getURL('groupMessageURI'),
|
|
@@ -1282,7 +1278,6 @@ var Message = /*#__PURE__*/function () {
|
|
|
1282
1278
|
groupOpenid: groupOpenid,
|
|
1283
1279
|
messageID: messageID
|
|
1284
1280
|
},
|
|
1285
|
-
params: params,
|
|
1286
1281
|
apiVersion: 'v2'
|
|
1287
1282
|
};
|
|
1288
1283
|
return this.request(options);
|
|
@@ -1292,7 +1287,6 @@ var Message = /*#__PURE__*/function () {
|
|
|
1292
1287
|
}, {
|
|
1293
1288
|
key: "postGroupMessage",
|
|
1294
1289
|
value: function postGroupMessage(groupOpenid, message) {
|
|
1295
|
-
message.timestamp = Date.now();
|
|
1296
1290
|
var options = {
|
|
1297
1291
|
method: 'POST',
|
|
1298
1292
|
url: getURL('groupMessagesURI'),
|
|
@@ -1730,8 +1724,8 @@ var Audio = /*#__PURE__*/function () {
|
|
|
1730
1724
|
}]);
|
|
1731
1725
|
}();
|
|
1732
1726
|
|
|
1733
|
-
function ownKeys$
|
|
1734
|
-
function _objectSpread$
|
|
1727
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1728
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1735
1729
|
var Mute = /*#__PURE__*/function () {
|
|
1736
1730
|
function Mute(request, config) {
|
|
1737
1731
|
_classCallCheck(this, Mute);
|
|
@@ -1792,7 +1786,7 @@ var Mute = /*#__PURE__*/function () {
|
|
|
1792
1786
|
guildID: guildID
|
|
1793
1787
|
},
|
|
1794
1788
|
// 将options和userIDList合并到一起
|
|
1795
|
-
data: _objectSpread$
|
|
1789
|
+
data: _objectSpread$3(_objectSpread$3({}, options), {}, {
|
|
1796
1790
|
user_ids: userIDList
|
|
1797
1791
|
})
|
|
1798
1792
|
};
|
|
@@ -1988,6 +1982,8 @@ var Schedule = /*#__PURE__*/function () {
|
|
|
1988
1982
|
}]);
|
|
1989
1983
|
}();
|
|
1990
1984
|
|
|
1985
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1986
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1991
1987
|
var Threads = /*#__PURE__*/function () {
|
|
1992
1988
|
function Threads(request, config) {
|
|
1993
1989
|
_classCallCheck(this, Threads);
|
|
@@ -2000,37 +1996,37 @@ var Threads = /*#__PURE__*/function () {
|
|
|
2000
1996
|
// 获取帖子列表
|
|
2001
1997
|
return _createClass(Threads, [{
|
|
2002
1998
|
key: "threads",
|
|
2003
|
-
value: function threads(channelID) {
|
|
2004
|
-
var options = {
|
|
1999
|
+
value: function threads(channelID, requestOptions) {
|
|
2000
|
+
var options = _objectSpread$2({
|
|
2005
2001
|
method: 'GET',
|
|
2006
2002
|
url: getURL('threadsURI'),
|
|
2007
2003
|
rest: {
|
|
2008
2004
|
channelID: channelID
|
|
2009
2005
|
}
|
|
2010
|
-
};
|
|
2006
|
+
}, requestOptions || {});
|
|
2011
2007
|
return this.request(options);
|
|
2012
2008
|
}
|
|
2013
2009
|
|
|
2014
2010
|
// 获取帖子详情
|
|
2015
2011
|
}, {
|
|
2016
2012
|
key: "thread",
|
|
2017
|
-
value: function thread(channelID, threadID) {
|
|
2018
|
-
var options = {
|
|
2013
|
+
value: function thread(channelID, threadID, requestOptions) {
|
|
2014
|
+
var options = _objectSpread$2({
|
|
2019
2015
|
method: 'GET',
|
|
2020
2016
|
url: getURL('threadURI'),
|
|
2021
2017
|
rest: {
|
|
2022
2018
|
channelID: channelID,
|
|
2023
2019
|
threadID: threadID
|
|
2024
2020
|
}
|
|
2025
|
-
};
|
|
2021
|
+
}, requestOptions || {});
|
|
2026
2022
|
return this.request(options);
|
|
2027
2023
|
}
|
|
2028
2024
|
|
|
2029
2025
|
// 发表帖子
|
|
2030
2026
|
}, {
|
|
2031
2027
|
key: "putThreads",
|
|
2032
|
-
value: function putThreads(channelID, _Threads2) {
|
|
2033
|
-
var options = {
|
|
2028
|
+
value: function putThreads(channelID, _Threads2, requestOptions) {
|
|
2029
|
+
var options = _objectSpread$2({
|
|
2034
2030
|
method: 'PUT',
|
|
2035
2031
|
url: getURL('threadsURI'),
|
|
2036
2032
|
rest: {
|
|
@@ -2039,15 +2035,15 @@ var Threads = /*#__PURE__*/function () {
|
|
|
2039
2035
|
data: {
|
|
2040
2036
|
Threads: _Threads2
|
|
2041
2037
|
}
|
|
2042
|
-
};
|
|
2038
|
+
}, requestOptions || {});
|
|
2043
2039
|
return this.request(options);
|
|
2044
2040
|
}
|
|
2045
2041
|
|
|
2046
2042
|
// 发表帖子回复
|
|
2047
2043
|
}, {
|
|
2048
2044
|
key: "putPostReply",
|
|
2049
|
-
value: function putPostReply(channelID, threadID, postID, reply) {
|
|
2050
|
-
var options = {
|
|
2045
|
+
value: function putPostReply(channelID, threadID, postID, reply, requestOptions) {
|
|
2046
|
+
var options = _objectSpread$2({
|
|
2051
2047
|
method: 'PUT',
|
|
2052
2048
|
url: getURL('threadPostRepliesURI'),
|
|
2053
2049
|
rest: {
|
|
@@ -2056,22 +2052,22 @@ var Threads = /*#__PURE__*/function () {
|
|
|
2056
2052
|
postID: postID
|
|
2057
2053
|
},
|
|
2058
2054
|
data: reply
|
|
2059
|
-
};
|
|
2055
|
+
}, requestOptions || {});
|
|
2060
2056
|
return this.request(options);
|
|
2061
2057
|
}
|
|
2062
2058
|
|
|
2063
2059
|
// 删除帖子
|
|
2064
2060
|
}, {
|
|
2065
2061
|
key: "deleteThreads",
|
|
2066
|
-
value: function deleteThreads(channelID, threadID) {
|
|
2067
|
-
var options = {
|
|
2062
|
+
value: function deleteThreads(channelID, threadID, requestOptions) {
|
|
2063
|
+
var options = _objectSpread$2({
|
|
2068
2064
|
method: 'DELETE',
|
|
2069
2065
|
url: getURL('threadURI'),
|
|
2070
2066
|
rest: {
|
|
2071
2067
|
channelID: channelID,
|
|
2072
2068
|
threadID: threadID
|
|
2073
2069
|
}
|
|
2074
|
-
};
|
|
2070
|
+
}, requestOptions || {});
|
|
2075
2071
|
return this.request(options);
|
|
2076
2072
|
}
|
|
2077
2073
|
}]);
|
|
@@ -2146,6 +2142,8 @@ var Interaction = /*#__PURE__*/function () {
|
|
|
2146
2142
|
}]);
|
|
2147
2143
|
}();
|
|
2148
2144
|
|
|
2145
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2146
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2149
2147
|
var Group = /*#__PURE__*/function () {
|
|
2150
2148
|
function Group(request, config) {
|
|
2151
2149
|
_classCallCheck(this, Group);
|
|
@@ -2156,32 +2154,32 @@ var Group = /*#__PURE__*/function () {
|
|
|
2156
2154
|
}
|
|
2157
2155
|
return _createClass(Group, [{
|
|
2158
2156
|
key: "getGroupInfo",
|
|
2159
|
-
value: function getGroupInfo(groupOpenid) {
|
|
2160
|
-
return this.request({
|
|
2157
|
+
value: function getGroupInfo(groupOpenid, requestOptions) {
|
|
2158
|
+
return this.request(_objectSpread$1({
|
|
2161
2159
|
method: 'GET',
|
|
2162
2160
|
url: getURL('groupInfoURI'),
|
|
2163
2161
|
rest: {
|
|
2164
2162
|
groupOpenid: groupOpenid
|
|
2165
2163
|
},
|
|
2166
2164
|
apiVersion: 'v2'
|
|
2167
|
-
});
|
|
2165
|
+
}, requestOptions || {}));
|
|
2168
2166
|
}
|
|
2169
2167
|
}, {
|
|
2170
2168
|
key: "getGroupBotState",
|
|
2171
|
-
value: function getGroupBotState(groupOpenid) {
|
|
2172
|
-
return this.request({
|
|
2169
|
+
value: function getGroupBotState(groupOpenid, requestOptions) {
|
|
2170
|
+
return this.request(_objectSpread$1({
|
|
2173
2171
|
method: 'GET',
|
|
2174
2172
|
url: getURL('groupBotStateURI'),
|
|
2175
2173
|
rest: {
|
|
2176
2174
|
groupOpenid: groupOpenid
|
|
2177
2175
|
},
|
|
2178
2176
|
apiVersion: 'v2'
|
|
2179
|
-
});
|
|
2177
|
+
}, requestOptions || {}));
|
|
2180
2178
|
}
|
|
2181
2179
|
}, {
|
|
2182
2180
|
key: "getGroupJoinRequests",
|
|
2183
|
-
value: function getGroupJoinRequests(groupOpenid, pager) {
|
|
2184
|
-
return this.request({
|
|
2181
|
+
value: function getGroupJoinRequests(groupOpenid, pager, requestOptions) {
|
|
2182
|
+
return this.request(_objectSpread$1({
|
|
2185
2183
|
method: 'GET',
|
|
2186
2184
|
url: getURL('groupJoinRequestListURI'),
|
|
2187
2185
|
rest: {
|
|
@@ -2189,12 +2187,12 @@ var Group = /*#__PURE__*/function () {
|
|
|
2189
2187
|
},
|
|
2190
2188
|
params: pager || {},
|
|
2191
2189
|
apiVersion: 'v2'
|
|
2192
|
-
});
|
|
2190
|
+
}, requestOptions || {}));
|
|
2193
2191
|
}
|
|
2194
2192
|
}, {
|
|
2195
2193
|
key: "approveGroupJoinRequest",
|
|
2196
|
-
value: function approveGroupJoinRequest(groupOpenid, memberOpenid, options) {
|
|
2197
|
-
return this.request({
|
|
2194
|
+
value: function approveGroupJoinRequest(groupOpenid, memberOpenid, options, requestOptions) {
|
|
2195
|
+
return this.request(_objectSpread$1({
|
|
2198
2196
|
method: 'POST',
|
|
2199
2197
|
url: getURL('groupJoinRequestApprovalURI'),
|
|
2200
2198
|
rest: {
|
|
@@ -2203,24 +2201,24 @@ var Group = /*#__PURE__*/function () {
|
|
|
2203
2201
|
},
|
|
2204
2202
|
data: options,
|
|
2205
2203
|
apiVersion: 'v2'
|
|
2206
|
-
});
|
|
2204
|
+
}, requestOptions || {}));
|
|
2207
2205
|
}
|
|
2208
2206
|
}, {
|
|
2209
2207
|
key: "getGroupRestrictChatSetting",
|
|
2210
|
-
value: function getGroupRestrictChatSetting(groupOpenid) {
|
|
2211
|
-
return this.request({
|
|
2208
|
+
value: function getGroupRestrictChatSetting(groupOpenid, requestOptions) {
|
|
2209
|
+
return this.request(_objectSpread$1({
|
|
2212
2210
|
method: 'GET',
|
|
2213
2211
|
url: getURL('groupRestrictChatSettingURI'),
|
|
2214
2212
|
rest: {
|
|
2215
2213
|
groupOpenid: groupOpenid
|
|
2216
2214
|
},
|
|
2217
2215
|
apiVersion: 'v2'
|
|
2218
|
-
});
|
|
2216
|
+
}, requestOptions || {}));
|
|
2219
2217
|
}
|
|
2220
2218
|
}, {
|
|
2221
2219
|
key: "setGroupRestrictChatSetting",
|
|
2222
|
-
value: function setGroupRestrictChatSetting(groupOpenid, options) {
|
|
2223
|
-
return this.request({
|
|
2220
|
+
value: function setGroupRestrictChatSetting(groupOpenid, options, requestOptions) {
|
|
2221
|
+
return this.request(_objectSpread$1({
|
|
2224
2222
|
method: 'POST',
|
|
2225
2223
|
url: getURL('groupRestrictChatSettingURI'),
|
|
2226
2224
|
rest: {
|
|
@@ -2228,32 +2226,32 @@ var Group = /*#__PURE__*/function () {
|
|
|
2228
2226
|
},
|
|
2229
2227
|
data: options,
|
|
2230
2228
|
apiVersion: 'v2'
|
|
2231
|
-
});
|
|
2229
|
+
}, requestOptions || {}));
|
|
2232
2230
|
}
|
|
2233
2231
|
}, {
|
|
2234
2232
|
key: "getGroupJoinApprovalStrategies",
|
|
2235
|
-
value: function getGroupJoinApprovalStrategies(pager) {
|
|
2236
|
-
return this.request({
|
|
2233
|
+
value: function getGroupJoinApprovalStrategies(pager, requestOptions) {
|
|
2234
|
+
return this.request(_objectSpread$1({
|
|
2237
2235
|
method: 'GET',
|
|
2238
2236
|
url: getURL('groupJoinApprovalStrategiesURI'),
|
|
2239
2237
|
params: pager || {},
|
|
2240
2238
|
apiVersion: 'v2'
|
|
2241
|
-
});
|
|
2239
|
+
}, requestOptions || {}));
|
|
2242
2240
|
}
|
|
2243
2241
|
}, {
|
|
2244
2242
|
key: "createGroupJoinApprovalStrategy",
|
|
2245
|
-
value: function createGroupJoinApprovalStrategy(options) {
|
|
2246
|
-
return this.request({
|
|
2243
|
+
value: function createGroupJoinApprovalStrategy(options, requestOptions) {
|
|
2244
|
+
return this.request(_objectSpread$1({
|
|
2247
2245
|
method: 'POST',
|
|
2248
2246
|
url: getURL('groupJoinApprovalStrategiesURI'),
|
|
2249
2247
|
data: options,
|
|
2250
2248
|
apiVersion: 'v2'
|
|
2251
|
-
});
|
|
2249
|
+
}, requestOptions || {}));
|
|
2252
2250
|
}
|
|
2253
2251
|
}, {
|
|
2254
2252
|
key: "updateGroupJoinApprovalStrategy",
|
|
2255
|
-
value: function updateGroupJoinApprovalStrategy(strategyID, options) {
|
|
2256
|
-
return this.request({
|
|
2253
|
+
value: function updateGroupJoinApprovalStrategy(strategyID, options, requestOptions) {
|
|
2254
|
+
return this.request(_objectSpread$1({
|
|
2257
2255
|
method: 'PATCH',
|
|
2258
2256
|
url: getURL('groupJoinApprovalStrategyURI'),
|
|
2259
2257
|
rest: {
|
|
@@ -2261,24 +2259,24 @@ var Group = /*#__PURE__*/function () {
|
|
|
2261
2259
|
},
|
|
2262
2260
|
data: options,
|
|
2263
2261
|
apiVersion: 'v2'
|
|
2264
|
-
});
|
|
2262
|
+
}, requestOptions || {}));
|
|
2265
2263
|
}
|
|
2266
2264
|
}, {
|
|
2267
2265
|
key: "deleteGroupJoinApprovalStrategy",
|
|
2268
|
-
value: function deleteGroupJoinApprovalStrategy(strategyID) {
|
|
2269
|
-
return this.request({
|
|
2266
|
+
value: function deleteGroupJoinApprovalStrategy(strategyID, requestOptions) {
|
|
2267
|
+
return this.request(_objectSpread$1({
|
|
2270
2268
|
method: 'DELETE',
|
|
2271
2269
|
url: getURL('groupJoinApprovalStrategyURI'),
|
|
2272
2270
|
rest: {
|
|
2273
2271
|
strategyID: strategyID
|
|
2274
2272
|
},
|
|
2275
2273
|
apiVersion: 'v2'
|
|
2276
|
-
});
|
|
2274
|
+
}, requestOptions || {}));
|
|
2277
2275
|
}
|
|
2278
2276
|
}, {
|
|
2279
2277
|
key: "executeGroupJoinApprovalStrategy",
|
|
2280
|
-
value: function executeGroupJoinApprovalStrategy(strategyID) {
|
|
2281
|
-
return this.request({
|
|
2278
|
+
value: function executeGroupJoinApprovalStrategy(strategyID, requestOptions) {
|
|
2279
|
+
return this.request(_objectSpread$1({
|
|
2282
2280
|
method: 'POST',
|
|
2283
2281
|
url: getURL('groupJoinApprovalStrategyExecuteURI'),
|
|
2284
2282
|
rest: {
|
|
@@ -2286,12 +2284,12 @@ var Group = /*#__PURE__*/function () {
|
|
|
2286
2284
|
},
|
|
2287
2285
|
data: {},
|
|
2288
2286
|
apiVersion: 'v2'
|
|
2289
|
-
});
|
|
2287
|
+
}, requestOptions || {}));
|
|
2290
2288
|
}
|
|
2291
2289
|
}, {
|
|
2292
2290
|
key: "updateGroupJoinApprovalStrategyWhitelist",
|
|
2293
|
-
value: function updateGroupJoinApprovalStrategyWhitelist(strategyID, options) {
|
|
2294
|
-
return this.request({
|
|
2291
|
+
value: function updateGroupJoinApprovalStrategyWhitelist(strategyID, options, requestOptions) {
|
|
2292
|
+
return this.request(_objectSpread$1({
|
|
2295
2293
|
method: 'POST',
|
|
2296
2294
|
url: getURL('groupJoinApprovalStrategyWhitelistURI'),
|
|
2297
2295
|
rest: {
|
|
@@ -2299,7 +2297,7 @@ var Group = /*#__PURE__*/function () {
|
|
|
2299
2297
|
},
|
|
2300
2298
|
data: options,
|
|
2301
2299
|
apiVersion: 'v2'
|
|
2302
|
-
});
|
|
2300
|
+
}, requestOptions || {}));
|
|
2303
2301
|
}
|
|
2304
2302
|
}]);
|
|
2305
2303
|
}();
|
package/lib/index.js
CHANGED
|
@@ -321,7 +321,7 @@ var Guild = /*#__PURE__*/function () {
|
|
|
321
321
|
}]);
|
|
322
322
|
}();
|
|
323
323
|
|
|
324
|
-
var version = "4.7.
|
|
324
|
+
var version = "4.7.5";
|
|
325
325
|
|
|
326
326
|
function getDefaultExportFromCjs (x) {
|
|
327
327
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -1272,11 +1272,7 @@ var Message = /*#__PURE__*/function () {
|
|
|
1272
1272
|
// 群组撤回消息
|
|
1273
1273
|
}, {
|
|
1274
1274
|
key: "deleteGroupMessage",
|
|
1275
|
-
value: function deleteGroupMessage(groupOpenid, messageID
|
|
1276
|
-
var params = Object.create(null);
|
|
1277
|
-
if (typeof hideTip === 'boolean') {
|
|
1278
|
-
params.hidetip = hideTip;
|
|
1279
|
-
}
|
|
1275
|
+
value: function deleteGroupMessage(groupOpenid, messageID) {
|
|
1280
1276
|
var options = {
|
|
1281
1277
|
method: 'DELETE',
|
|
1282
1278
|
url: getURL('groupMessageURI'),
|
|
@@ -1284,7 +1280,6 @@ var Message = /*#__PURE__*/function () {
|
|
|
1284
1280
|
groupOpenid: groupOpenid,
|
|
1285
1281
|
messageID: messageID
|
|
1286
1282
|
},
|
|
1287
|
-
params: params,
|
|
1288
1283
|
apiVersion: 'v2'
|
|
1289
1284
|
};
|
|
1290
1285
|
return this.request(options);
|
|
@@ -1294,7 +1289,6 @@ var Message = /*#__PURE__*/function () {
|
|
|
1294
1289
|
}, {
|
|
1295
1290
|
key: "postGroupMessage",
|
|
1296
1291
|
value: function postGroupMessage(groupOpenid, message) {
|
|
1297
|
-
message.timestamp = Date.now();
|
|
1298
1292
|
var options = {
|
|
1299
1293
|
method: 'POST',
|
|
1300
1294
|
url: getURL('groupMessagesURI'),
|
|
@@ -1732,8 +1726,8 @@ var Audio = /*#__PURE__*/function () {
|
|
|
1732
1726
|
}]);
|
|
1733
1727
|
}();
|
|
1734
1728
|
|
|
1735
|
-
function ownKeys$
|
|
1736
|
-
function _objectSpread$
|
|
1729
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1730
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1737
1731
|
var Mute = /*#__PURE__*/function () {
|
|
1738
1732
|
function Mute(request, config) {
|
|
1739
1733
|
_classCallCheck(this, Mute);
|
|
@@ -1794,7 +1788,7 @@ var Mute = /*#__PURE__*/function () {
|
|
|
1794
1788
|
guildID: guildID
|
|
1795
1789
|
},
|
|
1796
1790
|
// 将options和userIDList合并到一起
|
|
1797
|
-
data: _objectSpread$
|
|
1791
|
+
data: _objectSpread$3(_objectSpread$3({}, options), {}, {
|
|
1798
1792
|
user_ids: userIDList
|
|
1799
1793
|
})
|
|
1800
1794
|
};
|
|
@@ -1990,6 +1984,8 @@ var Schedule = /*#__PURE__*/function () {
|
|
|
1990
1984
|
}]);
|
|
1991
1985
|
}();
|
|
1992
1986
|
|
|
1987
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1988
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1993
1989
|
var Threads = /*#__PURE__*/function () {
|
|
1994
1990
|
function Threads(request, config) {
|
|
1995
1991
|
_classCallCheck(this, Threads);
|
|
@@ -2002,37 +1998,37 @@ var Threads = /*#__PURE__*/function () {
|
|
|
2002
1998
|
// 获取帖子列表
|
|
2003
1999
|
return _createClass(Threads, [{
|
|
2004
2000
|
key: "threads",
|
|
2005
|
-
value: function threads(channelID) {
|
|
2006
|
-
var options = {
|
|
2001
|
+
value: function threads(channelID, requestOptions) {
|
|
2002
|
+
var options = _objectSpread$2({
|
|
2007
2003
|
method: 'GET',
|
|
2008
2004
|
url: getURL('threadsURI'),
|
|
2009
2005
|
rest: {
|
|
2010
2006
|
channelID: channelID
|
|
2011
2007
|
}
|
|
2012
|
-
};
|
|
2008
|
+
}, requestOptions || {});
|
|
2013
2009
|
return this.request(options);
|
|
2014
2010
|
}
|
|
2015
2011
|
|
|
2016
2012
|
// 获取帖子详情
|
|
2017
2013
|
}, {
|
|
2018
2014
|
key: "thread",
|
|
2019
|
-
value: function thread(channelID, threadID) {
|
|
2020
|
-
var options = {
|
|
2015
|
+
value: function thread(channelID, threadID, requestOptions) {
|
|
2016
|
+
var options = _objectSpread$2({
|
|
2021
2017
|
method: 'GET',
|
|
2022
2018
|
url: getURL('threadURI'),
|
|
2023
2019
|
rest: {
|
|
2024
2020
|
channelID: channelID,
|
|
2025
2021
|
threadID: threadID
|
|
2026
2022
|
}
|
|
2027
|
-
};
|
|
2023
|
+
}, requestOptions || {});
|
|
2028
2024
|
return this.request(options);
|
|
2029
2025
|
}
|
|
2030
2026
|
|
|
2031
2027
|
// 发表帖子
|
|
2032
2028
|
}, {
|
|
2033
2029
|
key: "putThreads",
|
|
2034
|
-
value: function putThreads(channelID, _Threads2) {
|
|
2035
|
-
var options = {
|
|
2030
|
+
value: function putThreads(channelID, _Threads2, requestOptions) {
|
|
2031
|
+
var options = _objectSpread$2({
|
|
2036
2032
|
method: 'PUT',
|
|
2037
2033
|
url: getURL('threadsURI'),
|
|
2038
2034
|
rest: {
|
|
@@ -2041,15 +2037,15 @@ var Threads = /*#__PURE__*/function () {
|
|
|
2041
2037
|
data: {
|
|
2042
2038
|
Threads: _Threads2
|
|
2043
2039
|
}
|
|
2044
|
-
};
|
|
2040
|
+
}, requestOptions || {});
|
|
2045
2041
|
return this.request(options);
|
|
2046
2042
|
}
|
|
2047
2043
|
|
|
2048
2044
|
// 发表帖子回复
|
|
2049
2045
|
}, {
|
|
2050
2046
|
key: "putPostReply",
|
|
2051
|
-
value: function putPostReply(channelID, threadID, postID, reply) {
|
|
2052
|
-
var options = {
|
|
2047
|
+
value: function putPostReply(channelID, threadID, postID, reply, requestOptions) {
|
|
2048
|
+
var options = _objectSpread$2({
|
|
2053
2049
|
method: 'PUT',
|
|
2054
2050
|
url: getURL('threadPostRepliesURI'),
|
|
2055
2051
|
rest: {
|
|
@@ -2058,22 +2054,22 @@ var Threads = /*#__PURE__*/function () {
|
|
|
2058
2054
|
postID: postID
|
|
2059
2055
|
},
|
|
2060
2056
|
data: reply
|
|
2061
|
-
};
|
|
2057
|
+
}, requestOptions || {});
|
|
2062
2058
|
return this.request(options);
|
|
2063
2059
|
}
|
|
2064
2060
|
|
|
2065
2061
|
// 删除帖子
|
|
2066
2062
|
}, {
|
|
2067
2063
|
key: "deleteThreads",
|
|
2068
|
-
value: function deleteThreads(channelID, threadID) {
|
|
2069
|
-
var options = {
|
|
2064
|
+
value: function deleteThreads(channelID, threadID, requestOptions) {
|
|
2065
|
+
var options = _objectSpread$2({
|
|
2070
2066
|
method: 'DELETE',
|
|
2071
2067
|
url: getURL('threadURI'),
|
|
2072
2068
|
rest: {
|
|
2073
2069
|
channelID: channelID,
|
|
2074
2070
|
threadID: threadID
|
|
2075
2071
|
}
|
|
2076
|
-
};
|
|
2072
|
+
}, requestOptions || {});
|
|
2077
2073
|
return this.request(options);
|
|
2078
2074
|
}
|
|
2079
2075
|
}]);
|
|
@@ -2148,6 +2144,8 @@ var Interaction = /*#__PURE__*/function () {
|
|
|
2148
2144
|
}]);
|
|
2149
2145
|
}();
|
|
2150
2146
|
|
|
2147
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2148
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2151
2149
|
var Group = /*#__PURE__*/function () {
|
|
2152
2150
|
function Group(request, config) {
|
|
2153
2151
|
_classCallCheck(this, Group);
|
|
@@ -2158,32 +2156,32 @@ var Group = /*#__PURE__*/function () {
|
|
|
2158
2156
|
}
|
|
2159
2157
|
return _createClass(Group, [{
|
|
2160
2158
|
key: "getGroupInfo",
|
|
2161
|
-
value: function getGroupInfo(groupOpenid) {
|
|
2162
|
-
return this.request({
|
|
2159
|
+
value: function getGroupInfo(groupOpenid, requestOptions) {
|
|
2160
|
+
return this.request(_objectSpread$1({
|
|
2163
2161
|
method: 'GET',
|
|
2164
2162
|
url: getURL('groupInfoURI'),
|
|
2165
2163
|
rest: {
|
|
2166
2164
|
groupOpenid: groupOpenid
|
|
2167
2165
|
},
|
|
2168
2166
|
apiVersion: 'v2'
|
|
2169
|
-
});
|
|
2167
|
+
}, requestOptions || {}));
|
|
2170
2168
|
}
|
|
2171
2169
|
}, {
|
|
2172
2170
|
key: "getGroupBotState",
|
|
2173
|
-
value: function getGroupBotState(groupOpenid) {
|
|
2174
|
-
return this.request({
|
|
2171
|
+
value: function getGroupBotState(groupOpenid, requestOptions) {
|
|
2172
|
+
return this.request(_objectSpread$1({
|
|
2175
2173
|
method: 'GET',
|
|
2176
2174
|
url: getURL('groupBotStateURI'),
|
|
2177
2175
|
rest: {
|
|
2178
2176
|
groupOpenid: groupOpenid
|
|
2179
2177
|
},
|
|
2180
2178
|
apiVersion: 'v2'
|
|
2181
|
-
});
|
|
2179
|
+
}, requestOptions || {}));
|
|
2182
2180
|
}
|
|
2183
2181
|
}, {
|
|
2184
2182
|
key: "getGroupJoinRequests",
|
|
2185
|
-
value: function getGroupJoinRequests(groupOpenid, pager) {
|
|
2186
|
-
return this.request({
|
|
2183
|
+
value: function getGroupJoinRequests(groupOpenid, pager, requestOptions) {
|
|
2184
|
+
return this.request(_objectSpread$1({
|
|
2187
2185
|
method: 'GET',
|
|
2188
2186
|
url: getURL('groupJoinRequestListURI'),
|
|
2189
2187
|
rest: {
|
|
@@ -2191,12 +2189,12 @@ var Group = /*#__PURE__*/function () {
|
|
|
2191
2189
|
},
|
|
2192
2190
|
params: pager || {},
|
|
2193
2191
|
apiVersion: 'v2'
|
|
2194
|
-
});
|
|
2192
|
+
}, requestOptions || {}));
|
|
2195
2193
|
}
|
|
2196
2194
|
}, {
|
|
2197
2195
|
key: "approveGroupJoinRequest",
|
|
2198
|
-
value: function approveGroupJoinRequest(groupOpenid, memberOpenid, options) {
|
|
2199
|
-
return this.request({
|
|
2196
|
+
value: function approveGroupJoinRequest(groupOpenid, memberOpenid, options, requestOptions) {
|
|
2197
|
+
return this.request(_objectSpread$1({
|
|
2200
2198
|
method: 'POST',
|
|
2201
2199
|
url: getURL('groupJoinRequestApprovalURI'),
|
|
2202
2200
|
rest: {
|
|
@@ -2205,24 +2203,24 @@ var Group = /*#__PURE__*/function () {
|
|
|
2205
2203
|
},
|
|
2206
2204
|
data: options,
|
|
2207
2205
|
apiVersion: 'v2'
|
|
2208
|
-
});
|
|
2206
|
+
}, requestOptions || {}));
|
|
2209
2207
|
}
|
|
2210
2208
|
}, {
|
|
2211
2209
|
key: "getGroupRestrictChatSetting",
|
|
2212
|
-
value: function getGroupRestrictChatSetting(groupOpenid) {
|
|
2213
|
-
return this.request({
|
|
2210
|
+
value: function getGroupRestrictChatSetting(groupOpenid, requestOptions) {
|
|
2211
|
+
return this.request(_objectSpread$1({
|
|
2214
2212
|
method: 'GET',
|
|
2215
2213
|
url: getURL('groupRestrictChatSettingURI'),
|
|
2216
2214
|
rest: {
|
|
2217
2215
|
groupOpenid: groupOpenid
|
|
2218
2216
|
},
|
|
2219
2217
|
apiVersion: 'v2'
|
|
2220
|
-
});
|
|
2218
|
+
}, requestOptions || {}));
|
|
2221
2219
|
}
|
|
2222
2220
|
}, {
|
|
2223
2221
|
key: "setGroupRestrictChatSetting",
|
|
2224
|
-
value: function setGroupRestrictChatSetting(groupOpenid, options) {
|
|
2225
|
-
return this.request({
|
|
2222
|
+
value: function setGroupRestrictChatSetting(groupOpenid, options, requestOptions) {
|
|
2223
|
+
return this.request(_objectSpread$1({
|
|
2226
2224
|
method: 'POST',
|
|
2227
2225
|
url: getURL('groupRestrictChatSettingURI'),
|
|
2228
2226
|
rest: {
|
|
@@ -2230,32 +2228,32 @@ var Group = /*#__PURE__*/function () {
|
|
|
2230
2228
|
},
|
|
2231
2229
|
data: options,
|
|
2232
2230
|
apiVersion: 'v2'
|
|
2233
|
-
});
|
|
2231
|
+
}, requestOptions || {}));
|
|
2234
2232
|
}
|
|
2235
2233
|
}, {
|
|
2236
2234
|
key: "getGroupJoinApprovalStrategies",
|
|
2237
|
-
value: function getGroupJoinApprovalStrategies(pager) {
|
|
2238
|
-
return this.request({
|
|
2235
|
+
value: function getGroupJoinApprovalStrategies(pager, requestOptions) {
|
|
2236
|
+
return this.request(_objectSpread$1({
|
|
2239
2237
|
method: 'GET',
|
|
2240
2238
|
url: getURL('groupJoinApprovalStrategiesURI'),
|
|
2241
2239
|
params: pager || {},
|
|
2242
2240
|
apiVersion: 'v2'
|
|
2243
|
-
});
|
|
2241
|
+
}, requestOptions || {}));
|
|
2244
2242
|
}
|
|
2245
2243
|
}, {
|
|
2246
2244
|
key: "createGroupJoinApprovalStrategy",
|
|
2247
|
-
value: function createGroupJoinApprovalStrategy(options) {
|
|
2248
|
-
return this.request({
|
|
2245
|
+
value: function createGroupJoinApprovalStrategy(options, requestOptions) {
|
|
2246
|
+
return this.request(_objectSpread$1({
|
|
2249
2247
|
method: 'POST',
|
|
2250
2248
|
url: getURL('groupJoinApprovalStrategiesURI'),
|
|
2251
2249
|
data: options,
|
|
2252
2250
|
apiVersion: 'v2'
|
|
2253
|
-
});
|
|
2251
|
+
}, requestOptions || {}));
|
|
2254
2252
|
}
|
|
2255
2253
|
}, {
|
|
2256
2254
|
key: "updateGroupJoinApprovalStrategy",
|
|
2257
|
-
value: function updateGroupJoinApprovalStrategy(strategyID, options) {
|
|
2258
|
-
return this.request({
|
|
2255
|
+
value: function updateGroupJoinApprovalStrategy(strategyID, options, requestOptions) {
|
|
2256
|
+
return this.request(_objectSpread$1({
|
|
2259
2257
|
method: 'PATCH',
|
|
2260
2258
|
url: getURL('groupJoinApprovalStrategyURI'),
|
|
2261
2259
|
rest: {
|
|
@@ -2263,24 +2261,24 @@ var Group = /*#__PURE__*/function () {
|
|
|
2263
2261
|
},
|
|
2264
2262
|
data: options,
|
|
2265
2263
|
apiVersion: 'v2'
|
|
2266
|
-
});
|
|
2264
|
+
}, requestOptions || {}));
|
|
2267
2265
|
}
|
|
2268
2266
|
}, {
|
|
2269
2267
|
key: "deleteGroupJoinApprovalStrategy",
|
|
2270
|
-
value: function deleteGroupJoinApprovalStrategy(strategyID) {
|
|
2271
|
-
return this.request({
|
|
2268
|
+
value: function deleteGroupJoinApprovalStrategy(strategyID, requestOptions) {
|
|
2269
|
+
return this.request(_objectSpread$1({
|
|
2272
2270
|
method: 'DELETE',
|
|
2273
2271
|
url: getURL('groupJoinApprovalStrategyURI'),
|
|
2274
2272
|
rest: {
|
|
2275
2273
|
strategyID: strategyID
|
|
2276
2274
|
},
|
|
2277
2275
|
apiVersion: 'v2'
|
|
2278
|
-
});
|
|
2276
|
+
}, requestOptions || {}));
|
|
2279
2277
|
}
|
|
2280
2278
|
}, {
|
|
2281
2279
|
key: "executeGroupJoinApprovalStrategy",
|
|
2282
|
-
value: function executeGroupJoinApprovalStrategy(strategyID) {
|
|
2283
|
-
return this.request({
|
|
2280
|
+
value: function executeGroupJoinApprovalStrategy(strategyID, requestOptions) {
|
|
2281
|
+
return this.request(_objectSpread$1({
|
|
2284
2282
|
method: 'POST',
|
|
2285
2283
|
url: getURL('groupJoinApprovalStrategyExecuteURI'),
|
|
2286
2284
|
rest: {
|
|
@@ -2288,12 +2286,12 @@ var Group = /*#__PURE__*/function () {
|
|
|
2288
2286
|
},
|
|
2289
2287
|
data: {},
|
|
2290
2288
|
apiVersion: 'v2'
|
|
2291
|
-
});
|
|
2289
|
+
}, requestOptions || {}));
|
|
2292
2290
|
}
|
|
2293
2291
|
}, {
|
|
2294
2292
|
key: "updateGroupJoinApprovalStrategyWhitelist",
|
|
2295
|
-
value: function updateGroupJoinApprovalStrategyWhitelist(strategyID, options) {
|
|
2296
|
-
return this.request({
|
|
2293
|
+
value: function updateGroupJoinApprovalStrategyWhitelist(strategyID, options, requestOptions) {
|
|
2294
|
+
return this.request(_objectSpread$1({
|
|
2297
2295
|
method: 'POST',
|
|
2298
2296
|
url: getURL('groupJoinApprovalStrategyWhitelistURI'),
|
|
2299
2297
|
rest: {
|
|
@@ -2301,7 +2299,7 @@ var Group = /*#__PURE__*/function () {
|
|
|
2301
2299
|
},
|
|
2302
2300
|
data: options,
|
|
2303
2301
|
apiVersion: 'v2'
|
|
2304
|
-
});
|
|
2302
|
+
}, requestOptions || {}));
|
|
2305
2303
|
}
|
|
2306
2304
|
}]);
|
|
2307
2305
|
}();
|
package/package.json
CHANGED
package/typings/index.d.ts
CHANGED
|
@@ -156,19 +156,24 @@ declare const WsObjRequestOptions: (sandbox: boolean) => {
|
|
|
156
156
|
};
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
+
interface RequestTimeoutOptions {
|
|
160
|
+
/** 请求超时时间,单位为毫秒。 */
|
|
161
|
+
timeout?: number;
|
|
162
|
+
}
|
|
163
|
+
|
|
159
164
|
interface GroupAPI {
|
|
160
|
-
getGroupInfo: (groupOpenid: string) => Promise<RestyResponse<GroupInfo>>;
|
|
161
|
-
getGroupBotState: (groupOpenid: string) => Promise<RestyResponse<GroupBotState>>;
|
|
162
|
-
getGroupJoinRequests: (groupOpenid: string, pager?: GroupCursorPager) => Promise<RestyResponse<GroupJoinRequestList>>;
|
|
163
|
-
approveGroupJoinRequest: (groupOpenid: string, memberOpenid: string, options: GroupJoinRequestApproval) => Promise<RestyResponse<Record<string, never>>>;
|
|
164
|
-
getGroupRestrictChatSetting: (groupOpenid: string) => Promise<RestyResponse<GroupRestrictChatSetting>>;
|
|
165
|
-
setGroupRestrictChatSetting: (groupOpenid: string, options: SetGroupRestrictChatSetting) => Promise<RestyResponse<Record<string, never>>>;
|
|
166
|
-
getGroupJoinApprovalStrategies: (pager?: GroupCursorPager) => Promise<RestyResponse<GroupJoinApprovalStrategyList>>;
|
|
167
|
-
createGroupJoinApprovalStrategy: (options: CreateGroupJoinApprovalStrategy) => Promise<RestyResponse<GroupJoinApprovalStrategyResult>>;
|
|
168
|
-
updateGroupJoinApprovalStrategy: (strategyID: string, options: UpdateGroupJoinApprovalStrategy) => Promise<RestyResponse<GroupJoinApprovalStrategyResult>>;
|
|
169
|
-
deleteGroupJoinApprovalStrategy: (strategyID: string) => Promise<RestyResponse<Record<string, never>>>;
|
|
170
|
-
executeGroupJoinApprovalStrategy: (strategyID: string) => Promise<RestyResponse<Record<string, never>>>;
|
|
171
|
-
updateGroupJoinApprovalStrategyWhitelist: (strategyID: string, options: UpdateGroupJoinApprovalStrategyWhitelist) => Promise<RestyResponse<GroupJoinApprovalStrategyWhitelistResult>>;
|
|
165
|
+
getGroupInfo: (groupOpenid: string, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<GroupInfo>>;
|
|
166
|
+
getGroupBotState: (groupOpenid: string, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<GroupBotState>>;
|
|
167
|
+
getGroupJoinRequests: (groupOpenid: string, pager?: GroupCursorPager, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<GroupJoinRequestList>>;
|
|
168
|
+
approveGroupJoinRequest: (groupOpenid: string, memberOpenid: string, options: GroupJoinRequestApproval, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<Record<string, never>>>;
|
|
169
|
+
getGroupRestrictChatSetting: (groupOpenid: string, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<GroupRestrictChatSetting>>;
|
|
170
|
+
setGroupRestrictChatSetting: (groupOpenid: string, options: SetGroupRestrictChatSetting, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<Record<string, never>>>;
|
|
171
|
+
getGroupJoinApprovalStrategies: (pager?: GroupCursorPager, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<GroupJoinApprovalStrategyList>>;
|
|
172
|
+
createGroupJoinApprovalStrategy: (options: CreateGroupJoinApprovalStrategy, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<GroupJoinApprovalStrategyResult>>;
|
|
173
|
+
updateGroupJoinApprovalStrategy: (strategyID: string, options: UpdateGroupJoinApprovalStrategy, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<GroupJoinApprovalStrategyResult>>;
|
|
174
|
+
deleteGroupJoinApprovalStrategy: (strategyID: string, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<Record<string, never>>>;
|
|
175
|
+
executeGroupJoinApprovalStrategy: (strategyID: string, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<Record<string, never>>>;
|
|
176
|
+
updateGroupJoinApprovalStrategyWhitelist: (strategyID: string, options: UpdateGroupJoinApprovalStrategyWhitelist, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<GroupJoinApprovalStrategyWhitelistResult>>;
|
|
172
177
|
}
|
|
173
178
|
interface GroupInfo {
|
|
174
179
|
group_openid: string;
|
|
@@ -179,13 +184,13 @@ interface GroupInfo {
|
|
|
179
184
|
group_member_num: number;
|
|
180
185
|
}
|
|
181
186
|
type GroupReceiveMessageSetting = 'all' | 'only_mention' | 'mention_and_context';
|
|
182
|
-
type GroupMemberRole = 'member' | 'owner' | 'admin';
|
|
187
|
+
type GroupMemberRole$1 = 'member' | 'owner' | 'admin';
|
|
183
188
|
interface GroupBotState {
|
|
184
189
|
member_openid: string;
|
|
185
190
|
joined_at: string;
|
|
186
191
|
allow_proactive_msg: boolean;
|
|
187
192
|
recv_msg_setting: GroupReceiveMessageSetting;
|
|
188
|
-
member_role: GroupMemberRole;
|
|
193
|
+
member_role: GroupMemberRole$1;
|
|
189
194
|
}
|
|
190
195
|
interface GroupCursorPager {
|
|
191
196
|
cursor?: string;
|
|
@@ -330,6 +335,61 @@ interface GroupMemberEvent {
|
|
|
330
335
|
}
|
|
331
336
|
type GroupMemberAddEvent = GroupMemberEvent;
|
|
332
337
|
type GroupMemberRemoveEvent = GroupMemberEvent;
|
|
338
|
+
type GroupMemberRole = 'member' | 'admin' | 'owner';
|
|
339
|
+
interface GroupMessageUser {
|
|
340
|
+
id: string;
|
|
341
|
+
username: string;
|
|
342
|
+
bot: boolean;
|
|
343
|
+
union_openid?: string;
|
|
344
|
+
union_user_account?: string;
|
|
345
|
+
user_openid?: string;
|
|
346
|
+
member_openid?: string;
|
|
347
|
+
member_role?: GroupMemberRole;
|
|
348
|
+
}
|
|
349
|
+
interface GroupMessageScene {
|
|
350
|
+
source: string;
|
|
351
|
+
ext: string[];
|
|
352
|
+
}
|
|
353
|
+
interface GroupMessageAttachment {
|
|
354
|
+
url: string;
|
|
355
|
+
filename: string;
|
|
356
|
+
width?: number;
|
|
357
|
+
height?: number;
|
|
358
|
+
size: number;
|
|
359
|
+
content_type: string;
|
|
360
|
+
voice_wav_url?: string;
|
|
361
|
+
asr_refer_text?: string;
|
|
362
|
+
}
|
|
363
|
+
interface GroupMessageArkData {
|
|
364
|
+
prompt: string;
|
|
365
|
+
ark_type: string;
|
|
366
|
+
ark_name: string;
|
|
367
|
+
fields: Record<string, unknown>;
|
|
368
|
+
}
|
|
369
|
+
interface GroupMessageElement {
|
|
370
|
+
msg_idx?: string;
|
|
371
|
+
author?: GroupMessageUser;
|
|
372
|
+
message_type?: number;
|
|
373
|
+
content?: string;
|
|
374
|
+
attachments?: GroupMessageAttachment[];
|
|
375
|
+
ark_data?: GroupMessageArkData;
|
|
376
|
+
msg_elements?: GroupMessageElement[];
|
|
377
|
+
}
|
|
378
|
+
interface GroupMessageEvent {
|
|
379
|
+
id: string;
|
|
380
|
+
author: GroupMessageUser;
|
|
381
|
+
content: string;
|
|
382
|
+
group_openid: string;
|
|
383
|
+
timestamp: string;
|
|
384
|
+
message_type: number;
|
|
385
|
+
message_scene: GroupMessageScene;
|
|
386
|
+
attachments?: GroupMessageAttachment[];
|
|
387
|
+
mentions?: GroupMessageUser[];
|
|
388
|
+
ark_data?: GroupMessageArkData;
|
|
389
|
+
msg_elements?: GroupMessageElement[];
|
|
390
|
+
}
|
|
391
|
+
type GroupAtMessageCreateEvent = GroupMessageEvent;
|
|
392
|
+
type GroupMessageCreateEvent = GroupMessageEvent;
|
|
333
393
|
interface GroupJoinRequestEvent extends GroupJoinRequest {
|
|
334
394
|
group_openid: string;
|
|
335
395
|
auto_approved?: {
|
|
@@ -337,6 +397,8 @@ interface GroupJoinRequestEvent extends GroupJoinRequest {
|
|
|
337
397
|
};
|
|
338
398
|
}
|
|
339
399
|
interface GroupEventPayloadMap {
|
|
400
|
+
GROUP_AT_MESSAGE_CREATE: GroupAtMessageCreateEvent;
|
|
401
|
+
GROUP_MESSAGE_CREATE: GroupMessageCreateEvent;
|
|
340
402
|
GROUP_ADD_ROBOT: GroupAddRobotEvent;
|
|
341
403
|
GROUP_DEL_ROBOT: GroupDelRobotEvent;
|
|
342
404
|
GROUP_MSG_RECEIVE: GroupMsgReceiveEvent;
|
|
@@ -490,12 +552,12 @@ interface MessageAPI {
|
|
|
490
552
|
message: (channelID: string, messageID: string) => Promise<RestyResponse<IMessageRes>>;
|
|
491
553
|
messages: (channelID: string, pager: MessagesPager) => Promise<RestyResponse<IMessage[]>>;
|
|
492
554
|
postMessage: (channelID: string, message: MessageToCreate) => Promise<RestyResponse<IMessage>>;
|
|
493
|
-
postGroupMessage: (groupOpenid: string, message:
|
|
555
|
+
postGroupMessage: (groupOpenid: string, message: GroupMessageToCreate) => Promise<RestyResponse<GroupMessageResponse>>;
|
|
494
556
|
postC2CMessage: (userID: string, message: MessageToCreate) => Promise<RestyResponse<IMessage>>;
|
|
495
557
|
patchMessage: (channelID: string, messageID: string, message: MessageToCreate) => Promise<RestyResponse<IMessage>>;
|
|
496
558
|
deleteMessage: (channelID: string, messageID: string, hideTip?: boolean) => Promise<RestyResponse<any>>;
|
|
497
559
|
deleteDirectMessage: (guildID: string, messageID: string, hideTip?: boolean) => Promise<RestyResponse<any>>;
|
|
498
|
-
deleteGroupMessage: (groupOpenid: string, messageID: string
|
|
560
|
+
deleteGroupMessage: (groupOpenid: string, messageID: string) => Promise<RestyResponse<Record<string, never>>>;
|
|
499
561
|
deleteC2CMessage: (userID: string, messageID: string, hideTip?: boolean) => Promise<RestyResponse<any>>;
|
|
500
562
|
postGroupMedia: (groupOpenid: string, message: MediaToCreate) => Promise<RestyResponse<IMedia>>;
|
|
501
563
|
postC2CMedia: (userID: string, message: MediaToCreate) => Promise<RestyResponse<IMedia>>;
|
|
@@ -566,6 +628,38 @@ interface MessageReference {
|
|
|
566
628
|
message_id: string;
|
|
567
629
|
ignore_get_message_error?: boolean;
|
|
568
630
|
}
|
|
631
|
+
interface GroupMessageReference {
|
|
632
|
+
message_id: string;
|
|
633
|
+
}
|
|
634
|
+
interface MessageMarkdown {
|
|
635
|
+
/** @deprecated 平台 Markdown 模板已废弃。 */
|
|
636
|
+
template_id?: number;
|
|
637
|
+
content?: string;
|
|
638
|
+
/** @deprecated 自定义 Markdown 模板已废弃。 */
|
|
639
|
+
custom_template_id?: string;
|
|
640
|
+
force_verify_image_resource?: boolean;
|
|
641
|
+
}
|
|
642
|
+
type GroupMessageType = 0 | 2 | 7;
|
|
643
|
+
interface GroupMessageToCreate {
|
|
644
|
+
msg_type?: GroupMessageType;
|
|
645
|
+
content?: string;
|
|
646
|
+
markdown?: MessageMarkdown;
|
|
647
|
+
keyboard?: MessageKeyboard;
|
|
648
|
+
msg_id?: string;
|
|
649
|
+
event_id?: string;
|
|
650
|
+
msg_seq?: number;
|
|
651
|
+
media?: Media;
|
|
652
|
+
message_reference?: GroupMessageReference;
|
|
653
|
+
is_wakeup?: boolean;
|
|
654
|
+
}
|
|
655
|
+
interface MessageExtInfo {
|
|
656
|
+
ref_idx: string;
|
|
657
|
+
}
|
|
658
|
+
interface GroupMessageResponse {
|
|
659
|
+
id: string;
|
|
660
|
+
timestamp: string;
|
|
661
|
+
ext_info: MessageExtInfo;
|
|
662
|
+
}
|
|
569
663
|
interface MessageToCreate {
|
|
570
664
|
content?: string;
|
|
571
665
|
embed?: Embed;
|
|
@@ -612,17 +706,21 @@ interface Button {
|
|
|
612
706
|
interface RenderData {
|
|
613
707
|
label?: string;
|
|
614
708
|
visited_label?: string;
|
|
615
|
-
style?:
|
|
709
|
+
style?: 0 | 1 | 2 | 3;
|
|
616
710
|
}
|
|
617
711
|
interface Action {
|
|
618
|
-
type?:
|
|
712
|
+
type?: 0 | 1 | 2;
|
|
619
713
|
permission?: Permission;
|
|
620
714
|
click_limit?: number;
|
|
621
715
|
data?: string;
|
|
716
|
+
unsupport_tips?: string;
|
|
717
|
+
enter?: boolean;
|
|
718
|
+
reply?: boolean;
|
|
719
|
+
anchor?: number;
|
|
622
720
|
at_bot_show_channel_list?: boolean;
|
|
623
721
|
}
|
|
624
722
|
interface Permission {
|
|
625
|
-
type?:
|
|
723
|
+
type?: 0 | 1 | 2;
|
|
626
724
|
specify_role_ids?: string[];
|
|
627
725
|
specify_user_ids?: string[];
|
|
628
726
|
}
|
|
@@ -760,11 +858,11 @@ type ScheduleToPatch = Partial<Omit<ISchedule, 'id'>>;
|
|
|
760
858
|
* ============= Threads 帖子接口 =============
|
|
761
859
|
*/
|
|
762
860
|
interface ThreadsAPI {
|
|
763
|
-
thread: (channelID: string, threadID: string) => Promise<RestyResponse<any>>;
|
|
764
|
-
threads: (channelID: string) => Promise<RestyResponse<any>>;
|
|
765
|
-
putThreads: (channelID: string, Threads: ThreadsToCreate) => Promise<RestyResponse<any>>;
|
|
766
|
-
putPostReply: (channelID: string, threadID: string, postID: string, reply: ThreadReplyToCreate) => Promise<RestyResponse<any>>;
|
|
767
|
-
deleteThreads: (channelID: string, threadID: string) => Promise<RestyResponse<any>>;
|
|
861
|
+
thread: (channelID: string, threadID: string, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<any>>;
|
|
862
|
+
threads: (channelID: string, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<any>>;
|
|
863
|
+
putThreads: (channelID: string, Threads: ThreadsToCreate, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<any>>;
|
|
864
|
+
putPostReply: (channelID: string, threadID: string, postID: string, reply: ThreadReplyToCreate, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<any>>;
|
|
865
|
+
deleteThreads: (channelID: string, threadID: string, requestOptions?: RequestTimeoutOptions) => Promise<RestyResponse<any>>;
|
|
768
866
|
}
|
|
769
867
|
interface ThreadsToCreate {
|
|
770
868
|
title?: string;
|
|
@@ -977,4 +1075,4 @@ declare function createOpenAPI(config: Config): OpenAPI;
|
|
|
977
1075
|
declare function createWebsocket(config: GetWsParam): WebsocketClient;
|
|
978
1076
|
|
|
979
1077
|
export { AvailableIntentsEventsEnum, IntentEvents, Intents, OpCode, SessionEvents, WSCodes, WebsocketCloseReason, WebsocketCode, WsEventType, WsObjRequestOptions, createOpenAPI, createWebsocket, selectOpenAPIVersion };
|
|
980
|
-
export type { APIVersion, Action, AnnounceAPI, Ark, ArkKV, ArkObj, ArkObjKV, AudioAPI, AudioControl, Button, ChannelAPI, ChannelPermissionsAPI, ChannelSubType, ChannelType, Config, CreateGroupJoinApprovalStrategy, CustomKeyboard, DirectMessageAPI, DirectMessageToCreate, Embed, EmbedField, EmbedThumbnail, EventTypes, GetWsParam, GroupAPI, GroupAddRobotEvent, GroupBotState, GroupCursorPager, GroupDelRobotEvent, GroupEventPayloadMap, GroupEventType, GroupGlobalMuteRule, GroupInfo, GroupJoinApplySource, GroupJoinApprovalStrategy, GroupJoinApprovalStrategyGroupAction, GroupJoinApprovalStrategyGroups, GroupJoinApprovalStrategyList, GroupJoinApprovalStrategyResult, GroupJoinApprovalStrategyState, GroupJoinApprovalStrategyWhitelistResult, GroupJoinRequest, GroupJoinRequestApproval, GroupJoinRequestEvent, GroupJoinRequestList, GroupJoinReviewQA, GroupJoinVerifyInfo, GroupJoinVerifyMethod, GroupMemberAddEvent, GroupMemberEvent, GroupMemberMuteState, GroupMemberRemoveEvent,
|
|
1078
|
+
export type { APIVersion, Action, AnnounceAPI, Ark, ArkKV, ArkObj, ArkObjKV, AudioAPI, AudioControl, Button, ChannelAPI, ChannelPermissionsAPI, ChannelSubType, ChannelType, Config, CreateGroupJoinApprovalStrategy, CustomKeyboard, DirectMessageAPI, DirectMessageToCreate, Embed, EmbedField, EmbedThumbnail, EventTypes, GetWsParam, GroupAPI, GroupAddRobotEvent, GroupAtMessageCreateEvent, GroupBotState, GroupCursorPager, GroupDelRobotEvent, GroupEventPayloadMap, GroupEventType, GroupGlobalMuteRule, GroupInfo, GroupJoinApplySource, GroupJoinApprovalStrategy, GroupJoinApprovalStrategyGroupAction, GroupJoinApprovalStrategyGroups, GroupJoinApprovalStrategyList, GroupJoinApprovalStrategyResult, GroupJoinApprovalStrategyState, GroupJoinApprovalStrategyWhitelistResult, GroupJoinRequest, GroupJoinRequestApproval, GroupJoinRequestEvent, GroupJoinRequestList, GroupJoinReviewQA, GroupJoinVerifyInfo, GroupJoinVerifyMethod, GroupMemberAddEvent, GroupMemberEvent, GroupMemberMuteState, GroupMemberRemoveEvent, GroupMessageArkData, GroupMessageAttachment, GroupMessageCreateEvent, GroupMessageElement, GroupMessageEvent, GroupMessageReference, GroupMessageResponse, GroupMessageScene, GroupMessageToCreate, GroupMessageType, GroupMessageUser, GroupMsgReceiveEvent, GroupMsgRejectEvent, GroupMuteMode, GroupMuteRecurringRule, GroupMuteScheduleRule, GroupReceiveMessageSetting, GroupRestrictChatSetting, GroupRobotEvent, GuildAPI, GuildMembersPager, GuildPermission, GuildPermissionDemand, GuildPermissionDemandIdentify, GuildPermissionRes, GuildPermissionsAPI, GuildRoles, HeartbeatParam, IAnnounce, IChannel, IChannelPermissions, IChannelRolePermissions, IDirectMessage, IGuild, IMedia, IMember, IMessage, IMessageRes, IOpenAPI, IPinsMessage, IRole, IRoleFilter, ISchedule, IUser, IVoiceMember, InputNotify, IntentEventsMapType, InteractionAPI, InteractionData, MeAPI, MeGuildsReq, Media, MediaToCreate, MemberAPI, MemberAddRoleBody, MessageAPI, MessageAttachment, MessageExtInfo, MessageKeyboard, MessageMarkdown, MessageReference, MessageToCreate, MessagesPager, MuteAPI, MuteOptions, Nullish, OpenAPIRequest, OpenAPIRequestOptions, PatchChannelObj, Permission, PermissionDemandToCreate, PinsMessageAPI, PostChannelObj, ReactionAPI, ReactionObj, ReactionUserListObj, RecommendChannel, RecommendObj, RenderData, RequestTimeoutOptions, RoleAPI, Row, ScheduleAPI, ScheduleRemindType, ScheduleToCreate, ScheduleToPatch, SessionRecord, SetGroupMemberMuteState, SetGroupRestrictChatSetting, ThreadReplyToCreate, ThreadsAPI, ThreadsToCreate, Token, UpdateChannelPermissions, UpdateGroupJoinApprovalStrategy, UpdateGroupJoinApprovalStrategyWhitelist, UpdateRoleRes, WebsocketAPI, WebsocketEventData, WsAddressObj, WsDataInfo, wsResData };
|