@elizaos/plugin-discord 2.0.0-beta.2 → 2.0.3-beta.3

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.
Files changed (78) hide show
  1. package/README.md +28 -68
  2. package/dist/account-client-pool.d.ts +5 -5
  3. package/dist/accounts.d.ts +2 -2
  4. package/dist/actions/setup-credentials.d.ts +0 -3
  5. package/dist/actions/setup-credentials.d.ts.map +1 -1
  6. package/dist/addressing.d.ts.map +1 -1
  7. package/dist/allowlist.d.ts +1 -1
  8. package/dist/attachments.d.ts +1 -1
  9. package/dist/attachments.d.ts.map +1 -1
  10. package/dist/banner.d.ts +1 -1
  11. package/dist/catalog-commands.d.ts +65 -0
  12. package/dist/catalog-commands.d.ts.map +1 -0
  13. package/dist/compat.d.ts +0 -25
  14. package/dist/compat.d.ts.map +1 -1
  15. package/dist/config.d.ts +1 -1
  16. package/dist/config.d.ts.map +1 -1
  17. package/dist/connector-account-provider.d.ts +4 -3
  18. package/dist/connector-account-provider.d.ts.map +1 -1
  19. package/dist/data-routes.d.ts +22 -0
  20. package/dist/data-routes.d.ts.map +1 -0
  21. package/dist/debouncer.d.ts +14 -0
  22. package/dist/debouncer.d.ts.map +1 -1
  23. package/dist/discord-commands.d.ts +2 -2
  24. package/dist/discord-commands.d.ts.map +1 -1
  25. package/dist/discord-events.d.ts +4 -3
  26. package/dist/discord-events.d.ts.map +1 -1
  27. package/dist/discord-history.d.ts +4 -4
  28. package/dist/discord-history.d.ts.map +1 -1
  29. package/dist/discord-interactions.d.ts +3 -3
  30. package/dist/discord-interactions.d.ts.map +1 -1
  31. package/dist/discord-local-service.d.ts +11 -3
  32. package/dist/discord-local-service.d.ts.map +1 -1
  33. package/dist/discord-reactions.d.ts +1 -1
  34. package/dist/draft-stream.d.ts +1 -1
  35. package/dist/environment.d.ts +5 -5
  36. package/dist/generated/specs/spec-helpers.d.ts +1 -1
  37. package/dist/generated/specs/specs.d.ts +2 -14
  38. package/dist/generated/specs/specs.d.ts.map +1 -1
  39. package/dist/inbound-envelope.d.ts +8 -1
  40. package/dist/inbound-envelope.d.ts.map +1 -1
  41. package/dist/index.browser.d.ts +4 -4
  42. package/dist/index.browser.d.ts.map +1 -1
  43. package/dist/index.d.ts +19 -18
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +10452 -9822
  46. package/dist/index.js.map +36 -33
  47. package/dist/interactions.d.ts +35 -0
  48. package/dist/interactions.d.ts.map +1 -0
  49. package/dist/messages.d.ts +7 -3
  50. package/dist/messages.d.ts.map +1 -1
  51. package/dist/owner-pairing-service.d.ts.map +1 -1
  52. package/dist/permissionEvents.d.ts +1 -1
  53. package/dist/profileSync.d.ts +1 -1
  54. package/dist/sensitive-request-adapter.d.ts +19 -0
  55. package/dist/sensitive-request-adapter.d.ts.map +1 -0
  56. package/dist/service.d.ts +25 -8
  57. package/dist/service.d.ts.map +1 -1
  58. package/dist/setup-routes.d.ts +16 -11
  59. package/dist/setup-routes.d.ts.map +1 -1
  60. package/dist/slash-commands.d.ts +3 -4
  61. package/dist/slash-commands.d.ts.map +1 -1
  62. package/dist/status-reactions.d.ts.map +1 -1
  63. package/dist/tests.d.ts +3 -3
  64. package/dist/tests.d.ts.map +1 -1
  65. package/dist/types.d.ts +8 -2
  66. package/dist/types.d.ts.map +1 -1
  67. package/dist/user-account-scraper/discord-desktop-cdp.d.ts +1 -1
  68. package/dist/user-account-scraper/discord-desktop-cdp.d.ts.map +1 -1
  69. package/dist/user-account-scraper/index.d.ts +3 -3
  70. package/dist/user-account-scraper/service.d.ts +2 -2
  71. package/dist/user-account-scraper/service.d.ts.map +1 -1
  72. package/dist/utils.d.ts +9 -7
  73. package/dist/utils.d.ts.map +1 -1
  74. package/dist/vitest.config.d.ts.map +1 -1
  75. package/dist/voice.d.ts +19 -12
  76. package/dist/voice.d.ts.map +1 -1
  77. package/package.json +37 -10
  78. package/registry-entry.json +120 -0
package/dist/voice.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import { EventEmitter } from "node:events";
2
2
  import { Readable } from "node:stream";
3
- import { type AudioPlayer, type VoiceConnection } from "@discordjs/voice";
3
+ import type { AudioPlayer, VoiceConnection } from "@discordjs/voice";
4
4
  import { ChannelType, type UUID } from "@elizaos/core";
5
5
  import { type BaseGuildVoiceChannel, type Channel, type Guild, type VoiceState } from "discord.js";
6
- import type { ICompatRuntime } from "./compat";
7
- import type { IDiscordService } from "./types";
6
+ import type { ICompatRuntime } from "./compat.js";
7
+ import type { IDiscordService } from "./types.js";
8
+ type DiscordVoiceModule = typeof import("@discordjs/voice");
9
+ export declare function loadDiscordVoiceModule(): Promise<DiscordVoiceModule>;
8
10
  /**
9
11
  * Class representing an AudioMonitor that listens for audio data from a Readable stream.
10
12
  */
@@ -37,7 +39,7 @@ export declare class AudioMonitor {
37
39
  *
38
40
  * @returns {Buffer | null} The concatenated Buffer or null
39
41
  */
40
- getBufferFromFlag(): Buffer<ArrayBuffer>;
42
+ getBufferFromFlag(): Buffer<ArrayBuffer> | null;
41
43
  /**
42
44
  * Concatenates all buffers in the array and returns a single buffer.
43
45
  *
@@ -66,6 +68,7 @@ export declare class VoiceManager extends EventEmitter {
66
68
  private client;
67
69
  private runtime;
68
70
  private accountId;
71
+ private resolveDiscordEntityId?;
69
72
  private streams;
70
73
  private connections;
71
74
  private activeMonitors;
@@ -76,7 +79,10 @@ export declare class VoiceManager extends EventEmitter {
76
79
  * @param {IDiscordService} service - The Discord service to use.
77
80
  * @param {ICompatRuntime} runtime - The runtime for the agent (with cross-core compat).
78
81
  */
79
- constructor(service: Pick<IDiscordService, "accountId" | "client">, runtime: ICompatRuntime);
82
+ constructor(service: Pick<IDiscordService, "accountId" | "client"> & {
83
+ resolveDiscordEntityId?: (userId: string) => UUID;
84
+ }, runtime: ICompatRuntime);
85
+ private resolveVoiceSpeakerEntityId;
80
86
  /**
81
87
  * Asynchronously retrieves the type of the channel.
82
88
  * @param {Channel} channel - The channel to get the type for.
@@ -115,7 +121,7 @@ export declare class VoiceManager extends EventEmitter {
115
121
  * @param {string} guildId - The ID of the guild to get the voice connection for.
116
122
  * @returns {VoiceConnection | undefined} The voice connection for the specified guild ID, or undefined if not found.
117
123
  */
118
- getVoiceConnection(guildId: string): VoiceConnection;
124
+ getVoiceConnection(guildId: string): VoiceConnection | undefined;
119
125
  /**
120
126
  * Monitor a member's audio stream for volume activity and speaking thresholds.
121
127
  *
@@ -138,26 +144,26 @@ export declare class VoiceManager extends EventEmitter {
138
144
  /**
139
145
  * Asynchronously debounces the process transcription function to prevent rapid execution.
140
146
  *
141
- * @param {UUID} entityId - The ID of the entity related to the transcription.
147
+ * @param {string} entityId - The Discord user ID related to the transcription.
142
148
  * @param {string} name - The name of the entity for transcription.
143
149
  * @param {string} userName - The username of the user initiating the transcription.
144
150
  * @param {BaseGuildVoiceChannel} channel - The voice channel where the transcription is happening.
145
151
  */
146
- debouncedProcessTranscription(entityId: UUID, name: string, userName: string, channel: BaseGuildVoiceChannel): Promise<void>;
152
+ debouncedProcessTranscription(entityId: string, name: string, userName: string, channel: BaseGuildVoiceChannel): Promise<void>;
147
153
  /**
148
154
  * Handle user audio stream for monitoring purposes.
149
155
  *
150
- * @param {UUID} userId - The unique identifier of the user.
156
+ * @param {string} entityId - The Discord user ID.
151
157
  * @param {string} name - The name of the user.
152
158
  * @param {string} userName - The username of the user.
153
159
  * @param {BaseGuildVoiceChannel} channel - The voice channel the user is in.
154
160
  * @param {Readable} audioStream - The audio stream to monitor.
155
161
  */
156
- handleUserStream(entityId: UUID, name: string, userName: string, channel: BaseGuildVoiceChannel, audioStream: Readable): Promise<void>;
162
+ handleUserStream(entityId: string, name: string, userName: string, channel: BaseGuildVoiceChannel, audioStream: Readable): Promise<void>;
157
163
  /**
158
164
  * Process the transcription of audio data for a user.
159
165
  *
160
- * @param {UUID} entityId - The unique ID of the user entity.
166
+ * @param {string} entityId - The Discord user ID.
161
167
  * @param {string} channelId - The ID of the channel where the transcription is taking place.
162
168
  * @param {BaseGuildVoiceChannel} channel - The voice channel where the user is speaking.
163
169
  * @param {string} name - The name of the user.
@@ -169,7 +175,7 @@ export declare class VoiceManager extends EventEmitter {
169
175
  * Handles a voice message received in a Discord channel.
170
176
  *
171
177
  * @param {string} message - The message content.
172
- * @param {UUID} entityId - The entity ID associated with the message.
178
+ * @param {string} entityId - The Discord user ID associated with the message.
173
179
  * @param {string} channelId - The ID of the Discord channel where the message was received.
174
180
  * @param {BaseGuildVoiceChannel} channel - The Discord channel where the message was received.
175
181
  * @param {string} name - The name associated with the message.
@@ -232,4 +238,5 @@ export declare class VoiceManager extends EventEmitter {
232
238
  reply: (message: string) => Promise<void>;
233
239
  }): Promise<void>;
234
240
  }
241
+ export {};
235
242
  //# sourceMappingURL=voice.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../voice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAY,QAAQ,EAAkB,MAAM,aAAa,CAAC;AACjE,OAAO,EACN,KAAK,WAAW,EAShB,KAAK,eAAe,EAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,WAAW,EAUX,KAAK,IAAI,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EAGZ,KAAK,KAAK,EAGV,KAAK,UAAU,EACf,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAsF/C;;GAEG;AACH,qBAAa,YAAY;IACxB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,KAAK,CAAS;IAEtB;;;;;;OAMG;gBAEF,QAAQ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IACG,gBAAgB,CACrB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,qBAAqB,EAC9B,WAAW,EAAE,QAAQ;IAoEtB;;;;;;;;;OASG;YACW,oBAAoB;IAgElC;;;;;;;;;;OAUG;YACW,aAAa;IAiL3B;;;;;OAKG;YACW,gBAAgB;IAsB9B;;;;OAIG;IACG,SAAS,CAAC,KAAK,EAAE,KAAK;IA8D5B;;;;;;OAMG;IACG,eAAe,CAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ;IAgE3D;;;;;OAKG;IACH,kBAAkB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAYlD;;;;;OAKG;IACG,wBAAwB,CAAC,WAAW,EAAE;QAC3C,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,EAAE;YACR,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;gBAAE,KAAK,EAAE,MAAM,CAAA;aAAE,GAAG,IAAI,CAAC;SAChD,CAAC;QACF,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;QACpB,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;KAC9C;IAwDD;;;;;OAKG;IACG,yBAAyB,CAAC,WAAW,EAAE;QAC5C,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;KAC1C;CA2BD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/plugin-discord",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.3-beta.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,9 +17,21 @@
17
17
  "types": "./dist/index.d.ts",
18
18
  "import": "./dist/index.js",
19
19
  "default": "./dist/index.js"
20
+ },
21
+ "./*.css": "./dist/*.css",
22
+ "./user-account-scraper": {
23
+ "types": "./dist/user-account-scraper/index.d.ts",
24
+ "import": "./dist/index.js",
25
+ "default": "./dist/index.js"
26
+ },
27
+ "./*": {
28
+ "types": "./dist/*.d.ts",
29
+ "import": "./dist/*.js",
30
+ "default": "./dist/*.js"
20
31
  }
21
32
  },
22
33
  "files": [
34
+ "registry-entry.json",
23
35
  "dist"
24
36
  ],
25
37
  "keywords": [],
@@ -29,39 +41,54 @@
29
41
  "build": "bun run build.ts",
30
42
  "build:ts": "bun run build.ts",
31
43
  "dev": "bun --hot build.ts",
32
- "clean": "rm -rf dist .turbo && find . \\( -path ./dist -o -path ./node_modules \\) -prune -o -type f -name '*.ts' -print | while IFS= read -r ts; do b=\"${ts%.ts}\"; rm -f \"$b.d.ts\" \"$b.d.ts.map\"; done",
44
+ "clean": "rm -rf dist .turbo && node ../../packages/scripts/clean-stray-dts.mjs",
33
45
  "test": "vitest run",
46
+ "test:harness": "vitest run --config ./vitest.harness.config.ts",
34
47
  "typecheck": "tsc --noEmit",
35
- "lint": "../../node_modules/.bin/biome check --write --unsafe .",
36
- "lint:check": "../../node_modules/.bin/biome check .",
37
- "format": "../../node_modules/.bin/biome format --write .",
38
- "format:check": "../../node_modules/.bin/biome format .",
48
+ "lint": "bunx @biomejs/biome check --write --unsafe .",
49
+ "lint:check": "bunx @biomejs/biome check .",
50
+ "format": "bunx @biomejs/biome format --write .",
51
+ "format:check": "bunx @biomejs/biome format .",
39
52
  "test:e2e": "node ../../packages/app-core/scripts/run-local-plugin-live-smoke.mjs",
40
53
  "test:live": "bun run test:e2e"
41
54
  },
42
55
  "dependencies": {
56
+ "@discordjs/builders": "^1.14.1",
57
+ "@discordjs/collection": "2.1.1",
58
+ "@discordjs/formatters": "^0.6.2",
59
+ "@discordjs/opus": "^0.10.0",
43
60
  "@discordjs/rest": "^2.6.1",
61
+ "@discordjs/util": "^1.2.0",
44
62
  "@discordjs/voice": "^0.19.2",
45
- "@elizaos/core": "2.0.0-beta.1",
46
- "@elizaos/plugin-browser": "2.0.0-beta.1",
63
+ "@discordjs/ws": "^1.2.3",
64
+ "@elizaos/core": "2.0.3-beta.3",
65
+ "@elizaos/plugin-browser": "2.0.3-beta.3",
66
+ "@elizaos/plugin-commands": "2.0.3-beta.3",
67
+ "@sapphire/snowflake": "3.5.5",
47
68
  "discord-api-types": "^0.38.0",
48
69
  "discord.js": "^14.26.4",
70
+ "fast-deep-equal": "3.1.3",
49
71
  "fast-levenshtein": "^3.0.0",
50
72
  "fluent-ffmpeg": "^2.1.3",
51
73
  "get-func-name": "^3.0.0",
52
74
  "libsodium-wrappers": "^0.8.0",
75
+ "lodash.snakecase": "4.1.1",
76
+ "magic-bytes.js": "^1.13.0",
53
77
  "opusscript": "^0.1.1",
54
78
  "prism-media": "1.3.5",
79
+ "tslib": "^2.6.3",
80
+ "undici": "8.5.0",
55
81
  "zod": "^4.4.3"
56
82
  },
57
83
  "devDependencies": {
58
84
  "@biomejs/biome": "^2.4.14",
85
+ "@elizaos/test-harness": "2.0.3-beta.3",
59
86
  "@types/node": "^25.0.3",
60
87
  "typescript": "^6.0.3",
61
88
  "vitest": "^4.1.4"
62
89
  },
63
90
  "peerDependencies": {
64
- "@elizaos/core": "2.0.0-beta.1"
91
+ "@elizaos/core": "2.0.3-beta.3"
65
92
  },
66
93
  "publishConfig": {
67
94
  "access": "public"
@@ -134,5 +161,5 @@
134
161
  "node": "Default export (Node.js)"
135
162
  }
136
163
  },
137
- "gitHead": "05d4ca11d769db8c7f54a722ee24b2ce2b951543"
164
+ "gitHead": "f54b0f4eaed317d59fa7dbcdce20f4cdb0734420"
138
165
  }
@@ -0,0 +1,120 @@
1
+ {
2
+ "id": "discord",
3
+ "name": "Discord",
4
+ "description": "Discord connector for elizaOS servers, voice, and message management with Eliza Cloud OAuth gateway or local bot-token setup.",
5
+ "npmName": "@elizaos/plugin-discord",
6
+ "version": "2.0.0-beta.0",
7
+ "source": "bundled",
8
+ "tags": ["connector", "social", "social-chat", "messaging", "discord"],
9
+ "config": {
10
+ "DISCORD_API_TOKEN": {
11
+ "type": "secret",
12
+ "required": true,
13
+ "sensitive": true,
14
+ "label": "Api Token",
15
+ "help": "Discord API token used to authenticate and log in the Discord client/service.",
16
+ "advanced": false
17
+ },
18
+ "DISCORD_APPLICATION_ID": {
19
+ "type": "string",
20
+ "required": false,
21
+ "sensitive": false,
22
+ "label": "Application Id",
23
+ "help": "Discord application ID for the bot (auto-resolved from bot token if omitted)",
24
+ "advanced": false
25
+ },
26
+ "CHANNEL_IDS": {
27
+ "type": "string",
28
+ "required": false,
29
+ "sensitive": false,
30
+ "label": "Ids",
31
+ "help": "Comma-separated list of Discord channel IDs that will be parsed into an array if provided.",
32
+ "advanced": false
33
+ },
34
+ "DISCORD_TEST_CHANNEL_ID": {
35
+ "type": "string",
36
+ "required": false,
37
+ "sensitive": false,
38
+ "label": "Test Channel Id",
39
+ "help": "Discord channel ID used during test suite to locate the test channel for sending messages, voice interactions, and other test operations.",
40
+ "advanced": false
41
+ },
42
+ "DISCORD_VOICE_CHANNEL_ID": {
43
+ "type": "string",
44
+ "required": false,
45
+ "sensitive": false,
46
+ "label": "Voice Channel Id",
47
+ "help": "ID of the Discord voice channel the bot should join when scanning a guild. If not supplied, the bot selects a channel based on member activity.",
48
+ "advanced": false
49
+ },
50
+ "DISCORD_SHOULD_IGNORE_BOT_MESSAGES": {
51
+ "type": "boolean",
52
+ "required": false,
53
+ "sensitive": false,
54
+ "label": "Should Ignore Bot Messages",
55
+ "help": "If true, the bot will ignore messages from other bots. Can be overridden by character settings.",
56
+ "advanced": false
57
+ },
58
+ "DISCORD_SHOULD_IGNORE_DIRECT_MESSAGES": {
59
+ "type": "boolean",
60
+ "required": false,
61
+ "sensitive": false,
62
+ "label": "Should Ignore Direct Messages",
63
+ "help": "If true, the bot will ignore direct messages. Can be overridden by character settings.",
64
+ "advanced": false
65
+ },
66
+ "DISCORD_SHOULD_RESPOND_ONLY_TO_MENTIONS": {
67
+ "type": "boolean",
68
+ "required": false,
69
+ "sensitive": false,
70
+ "label": "Should Respond Only To Mentions",
71
+ "help": "If true, the bot will only respond when explicitly mentioned. Can be overridden by character settings.",
72
+ "advanced": false
73
+ },
74
+ "DISCORD_LISTEN_CHANNEL_IDS": {
75
+ "type": "string",
76
+ "required": false,
77
+ "sensitive": false,
78
+ "label": "Listen Channel Ids",
79
+ "help": "Comma-separated list of Discord channel IDs where the bot will only listen (not respond).",
80
+ "advanced": false
81
+ }
82
+ },
83
+ "render": {
84
+ "visible": true,
85
+ "pinTo": [],
86
+ "style": "setup-panel",
87
+ "icon": "MessageCircle",
88
+ "group": "connector",
89
+ "groupOrder": 1,
90
+ "actions": ["enable", "configure", "setup-guide"]
91
+ },
92
+ "resources": {
93
+ "homepage": "https://github.com/elizaos-plugins/plugin-discord#readme",
94
+ "repository": "https://github.com/elizaos-plugins/plugin-discord",
95
+ "setupGuideUrl": "https://docs.eliza.ai/plugin-setup-guide#discord"
96
+ },
97
+ "dependsOn": [],
98
+ "kind": "connector",
99
+ "subtype": "messaging",
100
+ "auth": {
101
+ "kind": "oauth",
102
+ "credentialKeys": ["DISCORD_API_TOKEN"]
103
+ },
104
+ "accounts": {
105
+ "agent": {
106
+ "supported": true,
107
+ "authKind": "api-key",
108
+ "credentialKeys": ["DISCORD_API_TOKEN"],
109
+ "notes": "The agent's own Discord bot identity. Paste a bot token from the Discord Developer Portal; posts, mentions, replies, slash commands, and voice all run through the bot user."
110
+ },
111
+ "owner": {
112
+ "supported": true,
113
+ "authKind": "local-app",
114
+ "credentialKeys": [],
115
+ "osSupport": ["darwin", "win32"],
116
+ "notes": "The user's own Discord identity, driven via Discord Desktop's Chrome DevTools Protocol port. Eliza relaunches the local Discord client with --remote-debugging-port and reads/writes through the user's logged-in session — useful for DMs the agent's bot has no access to. macOS uses osascript/open -a; Windows uses taskkill/Discord.exe from %LOCALAPPDATA%\\Discord\\app-*. Linux is not supported yet."
117
+ }
118
+ },
119
+ "channels": ["discord"]
120
+ }