woodenfish-bot 4.6.2 → 4.6.4
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 +23 -5
- package/lib/index.js +23 -5
- package/package.json +7 -7
- package/typings/index.d.ts +8 -3
package/es/index.js
CHANGED
|
@@ -49,6 +49,7 @@ var apiMap = {
|
|
|
49
49
|
scheduleURI: '/channels/:channelID/schedules/:scheduleID',
|
|
50
50
|
threadsURI: '/channels/:channelID/threads',
|
|
51
51
|
threadURI: '/channels/:channelID/threads/:threadID',
|
|
52
|
+
threadPostRepliesURI: '/channels/:channelID/threads/:threadID/posts/:postID/replies',
|
|
52
53
|
guildPermissionURI: '/guilds/:guildID/api_permission',
|
|
53
54
|
guildPermissionDemandURI: '/guilds/:guildID/api_permission/demand',
|
|
54
55
|
wsInfo: '/gateway/bot',
|
|
@@ -298,7 +299,7 @@ var Guild = /*#__PURE__*/function () {
|
|
|
298
299
|
}]);
|
|
299
300
|
}();
|
|
300
301
|
|
|
301
|
-
var version = "4.6.
|
|
302
|
+
var version = "4.6.4";
|
|
302
303
|
|
|
303
304
|
function getDefaultExportFromCjs (x) {
|
|
304
305
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -1952,13 +1953,13 @@ var Threads = /*#__PURE__*/function () {
|
|
|
1952
1953
|
// 获取帖子详情
|
|
1953
1954
|
}, {
|
|
1954
1955
|
key: "thread",
|
|
1955
|
-
value: function thread(channelID,
|
|
1956
|
+
value: function thread(channelID, threadID) {
|
|
1956
1957
|
var options = {
|
|
1957
1958
|
method: 'GET',
|
|
1958
1959
|
url: getURL('threadURI'),
|
|
1959
1960
|
rest: {
|
|
1960
1961
|
channelID: channelID,
|
|
1961
|
-
|
|
1962
|
+
threadID: threadID
|
|
1962
1963
|
}
|
|
1963
1964
|
};
|
|
1964
1965
|
return this.request(options);
|
|
@@ -1981,16 +1982,33 @@ var Threads = /*#__PURE__*/function () {
|
|
|
1981
1982
|
return this.request(options);
|
|
1982
1983
|
}
|
|
1983
1984
|
|
|
1985
|
+
// 发表帖子回复
|
|
1986
|
+
}, {
|
|
1987
|
+
key: "putPostReply",
|
|
1988
|
+
value: function putPostReply(channelID, threadID, postID, reply) {
|
|
1989
|
+
var options = {
|
|
1990
|
+
method: 'PUT',
|
|
1991
|
+
url: getURL('threadPostRepliesURI'),
|
|
1992
|
+
rest: {
|
|
1993
|
+
channelID: channelID,
|
|
1994
|
+
threadID: threadID,
|
|
1995
|
+
postID: postID
|
|
1996
|
+
},
|
|
1997
|
+
data: reply
|
|
1998
|
+
};
|
|
1999
|
+
return this.request(options);
|
|
2000
|
+
}
|
|
2001
|
+
|
|
1984
2002
|
// 删除帖子
|
|
1985
2003
|
}, {
|
|
1986
2004
|
key: "deleteThreads",
|
|
1987
|
-
value: function deleteThreads(channelID,
|
|
2005
|
+
value: function deleteThreads(channelID, threadID) {
|
|
1988
2006
|
var options = {
|
|
1989
2007
|
method: 'DELETE',
|
|
1990
2008
|
url: getURL('threadURI'),
|
|
1991
2009
|
rest: {
|
|
1992
2010
|
channelID: channelID,
|
|
1993
|
-
|
|
2011
|
+
threadID: threadID
|
|
1994
2012
|
}
|
|
1995
2013
|
};
|
|
1996
2014
|
return this.request(options);
|
package/lib/index.js
CHANGED
|
@@ -51,6 +51,7 @@ var apiMap = {
|
|
|
51
51
|
scheduleURI: '/channels/:channelID/schedules/:scheduleID',
|
|
52
52
|
threadsURI: '/channels/:channelID/threads',
|
|
53
53
|
threadURI: '/channels/:channelID/threads/:threadID',
|
|
54
|
+
threadPostRepliesURI: '/channels/:channelID/threads/:threadID/posts/:postID/replies',
|
|
54
55
|
guildPermissionURI: '/guilds/:guildID/api_permission',
|
|
55
56
|
guildPermissionDemandURI: '/guilds/:guildID/api_permission/demand',
|
|
56
57
|
wsInfo: '/gateway/bot',
|
|
@@ -300,7 +301,7 @@ var Guild = /*#__PURE__*/function () {
|
|
|
300
301
|
}]);
|
|
301
302
|
}();
|
|
302
303
|
|
|
303
|
-
var version = "4.6.
|
|
304
|
+
var version = "4.6.4";
|
|
304
305
|
|
|
305
306
|
function getDefaultExportFromCjs (x) {
|
|
306
307
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -1954,13 +1955,13 @@ var Threads = /*#__PURE__*/function () {
|
|
|
1954
1955
|
// 获取帖子详情
|
|
1955
1956
|
}, {
|
|
1956
1957
|
key: "thread",
|
|
1957
|
-
value: function thread(channelID,
|
|
1958
|
+
value: function thread(channelID, threadID) {
|
|
1958
1959
|
var options = {
|
|
1959
1960
|
method: 'GET',
|
|
1960
1961
|
url: getURL('threadURI'),
|
|
1961
1962
|
rest: {
|
|
1962
1963
|
channelID: channelID,
|
|
1963
|
-
|
|
1964
|
+
threadID: threadID
|
|
1964
1965
|
}
|
|
1965
1966
|
};
|
|
1966
1967
|
return this.request(options);
|
|
@@ -1983,16 +1984,33 @@ var Threads = /*#__PURE__*/function () {
|
|
|
1983
1984
|
return this.request(options);
|
|
1984
1985
|
}
|
|
1985
1986
|
|
|
1987
|
+
// 发表帖子回复
|
|
1988
|
+
}, {
|
|
1989
|
+
key: "putPostReply",
|
|
1990
|
+
value: function putPostReply(channelID, threadID, postID, reply) {
|
|
1991
|
+
var options = {
|
|
1992
|
+
method: 'PUT',
|
|
1993
|
+
url: getURL('threadPostRepliesURI'),
|
|
1994
|
+
rest: {
|
|
1995
|
+
channelID: channelID,
|
|
1996
|
+
threadID: threadID,
|
|
1997
|
+
postID: postID
|
|
1998
|
+
},
|
|
1999
|
+
data: reply
|
|
2000
|
+
};
|
|
2001
|
+
return this.request(options);
|
|
2002
|
+
}
|
|
2003
|
+
|
|
1986
2004
|
// 删除帖子
|
|
1987
2005
|
}, {
|
|
1988
2006
|
key: "deleteThreads",
|
|
1989
|
-
value: function deleteThreads(channelID,
|
|
2007
|
+
value: function deleteThreads(channelID, threadID) {
|
|
1990
2008
|
var options = {
|
|
1991
2009
|
method: 'DELETE',
|
|
1992
2010
|
url: getURL('threadURI'),
|
|
1993
2011
|
rest: {
|
|
1994
2012
|
channelID: channelID,
|
|
1995
|
-
|
|
2013
|
+
threadID: threadID
|
|
1996
2014
|
}
|
|
1997
2015
|
};
|
|
1998
2016
|
return this.request(options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "woodenfish-bot",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.4",
|
|
4
4
|
"description": "woodenfish-bot",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@babel/preset-typescript": "^7.28.5",
|
|
40
40
|
"@babel/traverse": "^7.29.0",
|
|
41
41
|
"@babel/types": "^7.29.0",
|
|
42
|
-
"@commitlint/cli": "^20.5.
|
|
42
|
+
"@commitlint/cli": "^20.5.2",
|
|
43
43
|
"@commitlint/config-conventional": "^20.5.0",
|
|
44
44
|
"@eslint/js": "^9.39.3",
|
|
45
45
|
"@rollup/plugin-babel": "^6.1.0",
|
|
@@ -59,18 +59,18 @@
|
|
|
59
59
|
"cz-conventional-changelog": "^3.3.0",
|
|
60
60
|
"eslint": "^9.39.3",
|
|
61
61
|
"eslint-config-prettier": "^10.1.8",
|
|
62
|
-
"eslint-plugin-jest": "^29.15.
|
|
62
|
+
"eslint-plugin-jest": "^29.15.2",
|
|
63
63
|
"eslint-plugin-prettier": "^5.5.5",
|
|
64
|
-
"globals": "^17.
|
|
64
|
+
"globals": "^17.5.0",
|
|
65
65
|
"handlebars": "^4.7.9",
|
|
66
|
-
"inquirer": "^13.
|
|
66
|
+
"inquirer": "^13.4.2",
|
|
67
67
|
"jest": "^30.3.0",
|
|
68
68
|
"lint-staged": "^16.4.0",
|
|
69
69
|
"lodash.clonedeep": "^4.5.0",
|
|
70
|
-
"prettier": "^3.8.
|
|
70
|
+
"prettier": "^3.8.3",
|
|
71
71
|
"readline-sync": "^1.4.10",
|
|
72
72
|
"rimraf": "^6.1.3",
|
|
73
|
-
"rollup": "^4.60.
|
|
73
|
+
"rollup": "^4.60.2",
|
|
74
74
|
"rollup-plugin-dts": "^6.4.1",
|
|
75
75
|
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
76
76
|
"standard-version": "^9.5.0",
|
package/typings/index.d.ts
CHANGED
|
@@ -561,16 +561,21 @@ type ScheduleToPatch = Partial<Omit<ISchedule, 'id'>>;
|
|
|
561
561
|
* ============= Threads 帖子接口 =============
|
|
562
562
|
*/
|
|
563
563
|
interface ThreadsAPI {
|
|
564
|
-
thread: (channelID: string,
|
|
564
|
+
thread: (channelID: string, threadID: string) => Promise<RestyResponse<any>>;
|
|
565
565
|
threads: (channelID: string) => Promise<RestyResponse<any>>;
|
|
566
566
|
putThreads: (channelID: string, Threads: ThreadsToCreate) => Promise<RestyResponse<any>>;
|
|
567
|
-
|
|
567
|
+
putPostReply: (channelID: string, threadID: string, postID: string, reply: ThreadReplyToCreate) => Promise<RestyResponse<any>>;
|
|
568
|
+
deleteThreads: (channelID: string, threadID: string) => Promise<RestyResponse<any>>;
|
|
568
569
|
}
|
|
569
570
|
interface ThreadsToCreate {
|
|
570
571
|
title?: string;
|
|
571
572
|
content?: string;
|
|
572
573
|
format?: number;
|
|
573
574
|
}
|
|
575
|
+
interface ThreadReplyToCreate {
|
|
576
|
+
content?: string;
|
|
577
|
+
format?: number;
|
|
578
|
+
}
|
|
574
579
|
|
|
575
580
|
/**
|
|
576
581
|
* ============= Reaction 接口 =============
|
|
@@ -768,4 +773,4 @@ declare function createOpenAPI(config: Config): OpenAPI;
|
|
|
768
773
|
declare function createWebsocket(config: GetWsParam): WebsocketClient;
|
|
769
774
|
|
|
770
775
|
export { AvailableIntentsEventsEnum, IntentEvents, Intents, OpCode, SessionEvents, WSCodes, WebsocketCloseReason, WebsocketCode, WsEventType, WsObjRequestOptions, createOpenAPI, createWebsocket, selectOpenAPIVersion };
|
|
771
|
-
export type { APIVersion, Action, AnnounceAPI, Ark, ArkKV, ArkObj, ArkObjKV, AudioAPI, AudioControl, Button, ChannelAPI, ChannelPermissionsAPI, ChannelSubType, ChannelType, Config, CustomKeyboard, DirectMessageAPI, DirectMessageToCreate, Embed, EmbedField, EmbedThumbnail, EventTypes, GetWsParam, 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, MessageKeyboard, MessageReference, MessageToCreate, MessagesPager, MuteAPI, MuteOptions, Nullish, OpenAPIRequest, PatchChannelObj, Permission, PermissionDemandToCreate, PinsMessageAPI, PostChannelObj, ReactionAPI, ReactionObj, ReactionUserListObj, RecommendChannel, RecommendObj, RenderData, RoleAPI, Row, ScheduleAPI, ScheduleRemindType, ScheduleToCreate, ScheduleToPatch, SessionRecord, ThreadsAPI, ThreadsToCreate, Token, UpdateChannelPermissions, UpdateRoleRes, WebsocketAPI, WsAddressObj, WsDataInfo, wsResData };
|
|
776
|
+
export type { APIVersion, Action, AnnounceAPI, Ark, ArkKV, ArkObj, ArkObjKV, AudioAPI, AudioControl, Button, ChannelAPI, ChannelPermissionsAPI, ChannelSubType, ChannelType, Config, CustomKeyboard, DirectMessageAPI, DirectMessageToCreate, Embed, EmbedField, EmbedThumbnail, EventTypes, GetWsParam, 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, MessageKeyboard, MessageReference, MessageToCreate, MessagesPager, MuteAPI, MuteOptions, Nullish, OpenAPIRequest, PatchChannelObj, Permission, PermissionDemandToCreate, PinsMessageAPI, PostChannelObj, ReactionAPI, ReactionObj, ReactionUserListObj, RecommendChannel, RecommendObj, RenderData, RoleAPI, Row, ScheduleAPI, ScheduleRemindType, ScheduleToCreate, ScheduleToPatch, SessionRecord, ThreadReplyToCreate, ThreadsAPI, ThreadsToCreate, Token, UpdateChannelPermissions, UpdateRoleRes, WebsocketAPI, WsAddressObj, WsDataInfo, wsResData };
|