@frogbotai/piece-discord 0.5.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 FrogBot
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,38 @@
1
+ import { type PieceFactoryConfig } from "frogbot/pieces";
2
+ export declare const discordActions: readonly ["sendMessageWithBot", "send_message_webhook", "add_role_to_member", "remove_role_from_member", "list_guild_members", "find_channel"];
3
+ export declare const discordScopes: readonly [];
4
+ export declare function createDiscord(config?: PieceFactoryConfig): import("frogbot/pieces").Piece & {
5
+ /** Send Message with Bot: Send messages via bot to any channel or thread you want, with an optional file attachment. */
6
+ sendMessageWithBot: import("node_modules/frogbot/dist/types/tool").AnyTool;
7
+ /** Send Message Webhook: Send a discord message via webhook */
8
+ sendMessageWebhook: import("node_modules/frogbot/dist/types/tool").AnyTool;
9
+ /** Request Approval in a Channel: send a message to a channel asking for approval and wait for a response */
10
+ requestApprovalMessage: import("node_modules/frogbot/dist/types/tool").AnyTool;
11
+ /** Add role to member: Add Guild Member Role */
12
+ addRoleToMember: import("node_modules/frogbot/dist/types/tool").AnyTool;
13
+ /** Remove role from member: Remove Guild Member Role */
14
+ removeRoleFromMember: import("node_modules/frogbot/dist/types/tool").AnyTool;
15
+ /** Remove member from guild: Remove Guild Member */
16
+ removeMemberFromGuild: import("node_modules/frogbot/dist/types/tool").AnyTool;
17
+ /** List guild members: List Guild Members */
18
+ listGuildMembers: import("node_modules/frogbot/dist/types/tool").AnyTool;
19
+ /** Rename channel: rename a channel */
20
+ renameChannel: import("node_modules/frogbot/dist/types/tool").AnyTool;
21
+ /** Create channel: create a channel */
22
+ createChannel: import("node_modules/frogbot/dist/types/tool").AnyTool;
23
+ /** Delete channel: delete a channel */
24
+ deleteChannel: import("node_modules/frogbot/dist/types/tool").AnyTool;
25
+ /** Find channel: find a channel by name */
26
+ findChannel: import("node_modules/frogbot/dist/types/tool").AnyTool;
27
+ /** Remove ban from user: Removes the guild ban from a user */
28
+ removeBanFromUser: import("node_modules/frogbot/dist/types/tool").AnyTool;
29
+ /** Create guild role: Creates a new role on the specified guild */
30
+ createGuildRole: import("node_modules/frogbot/dist/types/tool").AnyTool;
31
+ /** Delete guild role: Deletes the specified role from the specified guild */
32
+ deleteGuildRole: import("node_modules/frogbot/dist/types/tool").AnyTool;
33
+ /** Ban guild member: Bans a guild member */
34
+ banGuildMember: import("node_modules/frogbot/dist/types/tool").AnyTool;
35
+ /** Custom API Call: Make a custom API call to a specific endpoint */
36
+ customApiCall: import("node_modules/frogbot/dist/types/tool").AnyTool;
37
+ };
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAElF,eAAO,MAAM,cAAc,gJAAiJ,CAAC;AAC7K,eAAO,MAAM,aAAa,aAAc,CAAC;AAEzC,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,kBAAkB;IAUrD,wHAAwH;;IAExH,+DAA+D;;IAE/D,6GAA6G;;IAE7G,gDAAgD;;IAEhD,wDAAwD;;IAExD,oDAAoD;;IAEpD,6CAA6C;;IAE7C,uCAAuC;;IAEvC,uCAAuC;;IAEvC,uCAAuC;;IAEvC,2CAA2C;;IAE3C,8DAA8D;;IAE9D,mEAAmE;;IAEnE,6EAA6E;;IAE7E,4CAA4C;;IAE5C,qEAAqE;;EAGxE"}
package/dist/index.js ADDED
@@ -0,0 +1,49 @@
1
+ import * as module from '@activepieces/piece-discord';
2
+ import { createActivepiecesPiece } from "frogbot/pieces";
3
+ export const discordActions = ['sendMessageWithBot', 'send_message_webhook', 'add_role_to_member', 'remove_role_from_member', 'list_guild_members', 'find_channel'];
4
+ export const discordScopes = [];
5
+ export function createDiscord(config) {
6
+ const piece = createActivepiecesPiece({
7
+ module: module,
8
+ service: "discord",
9
+ credentialType: "secret_text",
10
+ defaultActions: discordActions,
11
+ scopes: discordScopes,
12
+ config,
13
+ });
14
+ return Object.assign(piece, {
15
+ /** Send Message with Bot: Send messages via bot to any channel or thread you want, with an optional file attachment. */
16
+ sendMessageWithBot: piece.tool("sendMessageWithBot"),
17
+ /** Send Message Webhook: Send a discord message via webhook */
18
+ sendMessageWebhook: piece.tool("send_message_webhook"),
19
+ /** Request Approval in a Channel: send a message to a channel asking for approval and wait for a response */
20
+ requestApprovalMessage: piece.tool("request_approval_message"),
21
+ /** Add role to member: Add Guild Member Role */
22
+ addRoleToMember: piece.tool("add_role_to_member"),
23
+ /** Remove role from member: Remove Guild Member Role */
24
+ removeRoleFromMember: piece.tool("remove_role_from_member"),
25
+ /** Remove member from guild: Remove Guild Member */
26
+ removeMemberFromGuild: piece.tool("remove_member_from_guild"),
27
+ /** List guild members: List Guild Members */
28
+ listGuildMembers: piece.tool("list_guild_members"),
29
+ /** Rename channel: rename a channel */
30
+ renameChannel: piece.tool("rename_channel"),
31
+ /** Create channel: create a channel */
32
+ createChannel: piece.tool("create_channel"),
33
+ /** Delete channel: delete a channel */
34
+ deleteChannel: piece.tool("delete_channel"),
35
+ /** Find channel: find a channel by name */
36
+ findChannel: piece.tool("find_channel"),
37
+ /** Remove ban from user: Removes the guild ban from a user */
38
+ removeBanFromUser: piece.tool("remove_ban_from_user"),
39
+ /** Create guild role: Creates a new role on the specified guild */
40
+ createGuildRole: piece.tool("createGuildRole"),
41
+ /** Delete guild role: Deletes the specified role from the specified guild */
42
+ deleteGuildRole: piece.tool("deleteGuildRole"),
43
+ /** Ban guild member: Bans a guild member */
44
+ banGuildMember: piece.tool("ban_guild_member"),
45
+ /** Custom API Call: Make a custom API call to a specific endpoint */
46
+ customApiCall: piece.tool("custom_api_call"),
47
+ });
48
+ }
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAA2B,MAAM,gBAAgB,CAAC;AAElF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,oBAAoB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,cAAc,CAAU,CAAC;AAC7K,MAAM,CAAC,MAAM,aAAa,GAAG,EAAW,CAAC;AAEzC,MAAM,UAAU,aAAa,CAAC,MAA2B;IACvD,MAAM,KAAK,GAAG,uBAAuB,CAAC;QACpC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,SAAS;QAClB,cAAc,EAAE,aAAa;QAC7B,cAAc,EAAE,cAAc;QAC9B,MAAM,EAAE,aAAa;QACrB,MAAM;KACP,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,MAAM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ED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@frogbotai/piece-discord",
3
+ "version": "0.5.0",
4
+ "description": "Discord tools for FrogBot.",
5
+ "license": "MIT",
6
+ "author": "Colby Gilbert",
7
+ "type": "module",
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "sideEffects": false,
21
+ "dependencies": {
22
+ "@activepieces/piece-discord": "0.5.4"
23
+ },
24
+ "peerDependencies": {
25
+ "frogbot": "0.5.0"
26
+ },
27
+ "devDependencies": {
28
+ "typescript": "5.6.2",
29
+ "frogbot": "0.5.0"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "scripts": {
35
+ "build": "tsc -p tsconfig.json",
36
+ "clean": "rm -rf dist",
37
+ "typecheck": "tsc --noEmit"
38
+ }
39
+ }