agent-messenger 1.0.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/.claude/commands/release.md +92 -0
- package/.claude-plugin/README.md +144 -0
- package/.claude-plugin/marketplace.json +37 -0
- package/.claude-plugin/plugin.json +17 -0
- package/.github/workflows/ci.yml +30 -0
- package/CLAUDE.md +106 -0
- package/CONTRIBUTING.md +131 -0
- package/README.md +140 -0
- package/biome.json +34 -0
- package/bun.lock +252 -0
- package/dist/cli.d.ts +5 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +21 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +140 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/channel.d.ts +3 -0
- package/dist/commands/channel.d.ts.map +1 -0
- package/dist/commands/channel.js +118 -0
- package/dist/commands/channel.js.map +1 -0
- package/dist/commands/file.d.ts +3 -0
- package/dist/commands/file.d.ts.map +1 -0
- package/dist/commands/file.js +113 -0
- package/dist/commands/file.js.map +1 -0
- package/dist/commands/index.d.ts +9 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +9 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/message.d.ts +3 -0
- package/dist/commands/message.d.ts.map +1 -0
- package/dist/commands/message.js +214 -0
- package/dist/commands/message.js.map +1 -0
- package/dist/commands/reaction.d.ts +3 -0
- package/dist/commands/reaction.d.ts.map +1 -0
- package/dist/commands/reaction.js +100 -0
- package/dist/commands/reaction.js.map +1 -0
- package/dist/commands/snapshot.d.ts +3 -0
- package/dist/commands/snapshot.d.ts.map +1 -0
- package/dist/commands/snapshot.js +88 -0
- package/dist/commands/snapshot.js.map +1 -0
- package/dist/commands/user.d.ts +3 -0
- package/dist/commands/user.d.ts.map +1 -0
- package/dist/commands/user.js +96 -0
- package/dist/commands/user.js.map +1 -0
- package/dist/commands/workspace.d.ts +3 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +89 -0
- package/dist/commands/workspace.js.map +1 -0
- package/dist/lib/credential-manager.d.ts +13 -0
- package/dist/lib/credential-manager.d.ts.map +1 -0
- package/dist/lib/credential-manager.js +58 -0
- package/dist/lib/credential-manager.js.map +1 -0
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +3 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/ref-manager.d.ts +26 -0
- package/dist/lib/ref-manager.d.ts.map +1 -0
- package/dist/lib/ref-manager.js +92 -0
- package/dist/lib/ref-manager.js.map +1 -0
- package/dist/lib/slack-client.d.ts +37 -0
- package/dist/lib/slack-client.d.ts.map +1 -0
- package/dist/lib/slack-client.js +379 -0
- package/dist/lib/slack-client.js.map +1 -0
- package/dist/lib/token-extractor.d.ts +28 -0
- package/dist/lib/token-extractor.d.ts.map +1 -0
- package/dist/lib/token-extractor.js +401 -0
- package/dist/lib/token-extractor.js.map +1 -0
- package/dist/package.json +37 -0
- package/dist/src/cli.d.ts +5 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +22 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/platforms/discord/cli.d.ts +5 -0
- package/dist/src/platforms/discord/cli.d.ts.map +1 -0
- package/dist/src/platforms/discord/cli.js +22 -0
- package/dist/src/platforms/discord/cli.js.map +1 -0
- package/dist/src/platforms/discord/client.d.ts +34 -0
- package/dist/src/platforms/discord/client.d.ts.map +1 -0
- package/dist/src/platforms/discord/client.js +187 -0
- package/dist/src/platforms/discord/client.js.map +1 -0
- package/dist/src/platforms/discord/client.test.d.ts +2 -0
- package/dist/src/platforms/discord/client.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/client.test.js +367 -0
- package/dist/src/platforms/discord/client.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/auth.d.ts +13 -0
- package/dist/src/platforms/discord/commands/auth.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/auth.js +155 -0
- package/dist/src/platforms/discord/commands/auth.js.map +1 -0
- package/dist/src/platforms/discord/commands/auth.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/auth.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/auth.test.js +65 -0
- package/dist/src/platforms/discord/commands/auth.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/channel.d.ts +13 -0
- package/dist/src/platforms/discord/commands/channel.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/channel.js +99 -0
- package/dist/src/platforms/discord/commands/channel.js.map +1 -0
- package/dist/src/platforms/discord/commands/channel.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/channel.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/channel.test.js +136 -0
- package/dist/src/platforms/discord/commands/channel.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/file.d.ts +13 -0
- package/dist/src/platforms/discord/commands/file.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/file.js +99 -0
- package/dist/src/platforms/discord/commands/file.js.map +1 -0
- package/dist/src/platforms/discord/commands/file.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/file.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/file.test.js +83 -0
- package/dist/src/platforms/discord/commands/file.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/guild.d.ts +15 -0
- package/dist/src/platforms/discord/commands/guild.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/guild.js +102 -0
- package/dist/src/platforms/discord/commands/guild.js.map +1 -0
- package/dist/src/platforms/discord/commands/guild.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/guild.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/guild.test.js +100 -0
- package/dist/src/platforms/discord/commands/guild.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/index.d.ts +9 -0
- package/dist/src/platforms/discord/commands/index.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/index.js +9 -0
- package/dist/src/platforms/discord/commands/index.js.map +1 -0
- package/dist/src/platforms/discord/commands/message.d.ts +17 -0
- package/dist/src/platforms/discord/commands/message.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/message.js +131 -0
- package/dist/src/platforms/discord/commands/message.js.map +1 -0
- package/dist/src/platforms/discord/commands/message.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/message.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/message.test.js +91 -0
- package/dist/src/platforms/discord/commands/message.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/reaction.d.ts +12 -0
- package/dist/src/platforms/discord/commands/reaction.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/reaction.js +99 -0
- package/dist/src/platforms/discord/commands/reaction.js.map +1 -0
- package/dist/src/platforms/discord/commands/reaction.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/reaction.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/reaction.test.js +115 -0
- package/dist/src/platforms/discord/commands/reaction.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/snapshot.d.ts +9 -0
- package/dist/src/platforms/discord/commands/snapshot.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/snapshot.js +80 -0
- package/dist/src/platforms/discord/commands/snapshot.js.map +1 -0
- package/dist/src/platforms/discord/commands/snapshot.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/snapshot.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/snapshot.test.js +25 -0
- package/dist/src/platforms/discord/commands/snapshot.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/user.d.ts +3 -0
- package/dist/src/platforms/discord/commands/user.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/user.js +94 -0
- package/dist/src/platforms/discord/commands/user.js.map +1 -0
- package/dist/src/platforms/discord/commands/user.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/user.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/user.test.js +103 -0
- package/dist/src/platforms/discord/commands/user.test.js.map +1 -0
- package/dist/src/platforms/discord/credential-manager.d.ts +33 -0
- package/dist/src/platforms/discord/credential-manager.d.ts.map +1 -0
- package/dist/src/platforms/discord/credential-manager.js +73 -0
- package/dist/src/platforms/discord/credential-manager.js.map +1 -0
- package/dist/src/platforms/discord/credential-manager.test.d.ts +2 -0
- package/dist/src/platforms/discord/credential-manager.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/credential-manager.test.js +136 -0
- package/dist/src/platforms/discord/credential-manager.test.js.map +1 -0
- package/dist/src/platforms/discord/token-extractor.d.ts +55 -0
- package/dist/src/platforms/discord/token-extractor.d.ts.map +1 -0
- package/dist/src/platforms/discord/token-extractor.js +462 -0
- package/dist/src/platforms/discord/token-extractor.js.map +1 -0
- package/dist/src/platforms/discord/token-extractor.test.d.ts +2 -0
- package/dist/src/platforms/discord/token-extractor.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/token-extractor.test.js +789 -0
- package/dist/src/platforms/discord/token-extractor.test.js.map +1 -0
- package/dist/src/platforms/discord/types.d.ts +251 -0
- package/dist/src/platforms/discord/types.d.ts.map +1 -0
- package/dist/src/platforms/discord/types.js +74 -0
- package/dist/src/platforms/discord/types.js.map +1 -0
- package/dist/src/platforms/discord/types.test.d.ts +2 -0
- package/dist/src/platforms/discord/types.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/types.test.js +211 -0
- package/dist/src/platforms/discord/types.test.js.map +1 -0
- package/dist/src/platforms/slack/cli.d.ts +5 -0
- package/dist/src/platforms/slack/cli.d.ts.map +1 -0
- package/dist/src/platforms/slack/cli.js +22 -0
- package/dist/src/platforms/slack/cli.js.map +1 -0
- package/dist/src/platforms/slack/client.d.ts +47 -0
- package/dist/src/platforms/slack/client.d.ts.map +1 -0
- package/dist/src/platforms/slack/client.js +412 -0
- package/dist/src/platforms/slack/client.js.map +1 -0
- package/dist/src/platforms/slack/commands/auth.d.ts +3 -0
- package/dist/src/platforms/slack/commands/auth.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/auth.js +156 -0
- package/dist/src/platforms/slack/commands/auth.js.map +1 -0
- package/dist/src/platforms/slack/commands/channel.d.ts +3 -0
- package/dist/src/platforms/slack/commands/channel.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/channel.js +118 -0
- package/dist/src/platforms/slack/commands/channel.js.map +1 -0
- package/dist/src/platforms/slack/commands/file.d.ts +3 -0
- package/dist/src/platforms/slack/commands/file.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/file.js +113 -0
- package/dist/src/platforms/slack/commands/file.js.map +1 -0
- package/dist/src/platforms/slack/commands/index.d.ts +9 -0
- package/dist/src/platforms/slack/commands/index.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/index.js +9 -0
- package/dist/src/platforms/slack/commands/index.js.map +1 -0
- package/dist/src/platforms/slack/commands/message.d.ts +3 -0
- package/dist/src/platforms/slack/commands/message.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/message.js +263 -0
- package/dist/src/platforms/slack/commands/message.js.map +1 -0
- package/dist/src/platforms/slack/commands/reaction.d.ts +3 -0
- package/dist/src/platforms/slack/commands/reaction.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/reaction.js +100 -0
- package/dist/src/platforms/slack/commands/reaction.js.map +1 -0
- package/dist/src/platforms/slack/commands/snapshot.d.ts +3 -0
- package/dist/src/platforms/slack/commands/snapshot.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/snapshot.js +87 -0
- package/dist/src/platforms/slack/commands/snapshot.js.map +1 -0
- package/dist/src/platforms/slack/commands/user.d.ts +3 -0
- package/dist/src/platforms/slack/commands/user.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/user.js +96 -0
- package/dist/src/platforms/slack/commands/user.js.map +1 -0
- package/dist/src/platforms/slack/commands/workspace.d.ts +3 -0
- package/dist/src/platforms/slack/commands/workspace.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/workspace.js +89 -0
- package/dist/src/platforms/slack/commands/workspace.js.map +1 -0
- package/dist/src/platforms/slack/credential-manager.d.ts +13 -0
- package/dist/src/platforms/slack/credential-manager.d.ts.map +1 -0
- package/dist/src/platforms/slack/credential-manager.js +58 -0
- package/dist/src/platforms/slack/credential-manager.js.map +1 -0
- package/dist/src/platforms/slack/index.d.ts +3 -0
- package/dist/src/platforms/slack/index.d.ts.map +1 -0
- package/dist/src/platforms/slack/index.js +3 -0
- package/dist/src/platforms/slack/index.js.map +1 -0
- package/dist/src/platforms/slack/token-extractor.d.ts +28 -0
- package/dist/src/platforms/slack/token-extractor.d.ts.map +1 -0
- package/dist/src/platforms/slack/token-extractor.js +401 -0
- package/dist/src/platforms/slack/token-extractor.js.map +1 -0
- package/dist/src/platforms/slack/types.d.ts +369 -0
- package/dist/src/platforms/slack/types.d.ts.map +1 -0
- package/dist/src/platforms/slack/types.js +92 -0
- package/dist/src/platforms/slack/types.js.map +1 -0
- package/dist/src/shared/utils/concurrency.d.ts +2 -0
- package/dist/src/shared/utils/concurrency.d.ts.map +1 -0
- package/dist/src/shared/utils/concurrency.js +14 -0
- package/dist/src/shared/utils/concurrency.js.map +1 -0
- package/dist/src/shared/utils/concurrency.test.d.ts +2 -0
- package/dist/src/shared/utils/concurrency.test.d.ts.map +1 -0
- package/dist/src/shared/utils/concurrency.test.js +39 -0
- package/dist/src/shared/utils/concurrency.test.js.map +1 -0
- package/dist/src/shared/utils/error-handler.d.ts +2 -0
- package/dist/src/shared/utils/error-handler.d.ts.map +1 -0
- package/dist/src/shared/utils/error-handler.js +5 -0
- package/dist/src/shared/utils/error-handler.js.map +1 -0
- package/dist/src/shared/utils/output.d.ts +2 -0
- package/dist/src/shared/utils/output.d.ts.map +1 -0
- package/dist/src/shared/utils/output.js +4 -0
- package/dist/src/shared/utils/output.js.map +1 -0
- package/dist/tests/cli.test.d.ts +2 -0
- package/dist/tests/cli.test.d.ts.map +1 -0
- package/dist/tests/cli.test.js +83 -0
- package/dist/tests/cli.test.js.map +1 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/CURRENT +1 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOCK +0 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOG +3 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOG.old +1 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/MANIFEST-000004 +0 -0
- package/dist/tests/commands/auth.test.d.ts +2 -0
- package/dist/tests/commands/auth.test.d.ts.map +1 -0
- package/dist/tests/commands/auth.test.js +304 -0
- package/dist/tests/commands/auth.test.js.map +1 -0
- package/dist/tests/commands/channel.test.d.ts +2 -0
- package/dist/tests/commands/channel.test.d.ts.map +1 -0
- package/dist/tests/commands/channel.test.js +166 -0
- package/dist/tests/commands/channel.test.js.map +1 -0
- package/dist/tests/commands/file.test.d.ts +2 -0
- package/dist/tests/commands/file.test.d.ts.map +1 -0
- package/dist/tests/commands/file.test.js +175 -0
- package/dist/tests/commands/file.test.js.map +1 -0
- package/dist/tests/commands/message.test.d.ts +2 -0
- package/dist/tests/commands/message.test.d.ts.map +1 -0
- package/dist/tests/commands/message.test.js +293 -0
- package/dist/tests/commands/message.test.js.map +1 -0
- package/dist/tests/commands/reaction.test.d.ts +2 -0
- package/dist/tests/commands/reaction.test.d.ts.map +1 -0
- package/dist/tests/commands/reaction.test.js +84 -0
- package/dist/tests/commands/reaction.test.js.map +1 -0
- package/dist/tests/commands/snapshot.test.d.ts +2 -0
- package/dist/tests/commands/snapshot.test.d.ts.map +1 -0
- package/dist/tests/commands/snapshot.test.js +280 -0
- package/dist/tests/commands/snapshot.test.js.map +1 -0
- package/dist/tests/commands/user.test.d.ts +2 -0
- package/dist/tests/commands/user.test.d.ts.map +1 -0
- package/dist/tests/commands/user.test.js +117 -0
- package/dist/tests/commands/user.test.js.map +1 -0
- package/dist/tests/commands/workspace.test.d.ts +2 -0
- package/dist/tests/commands/workspace.test.d.ts.map +1 -0
- package/dist/tests/commands/workspace.test.js +453 -0
- package/dist/tests/commands/workspace.test.js.map +1 -0
- package/dist/tests/credential-manager.test.d.ts +2 -0
- package/dist/tests/credential-manager.test.d.ts.map +1 -0
- package/dist/tests/credential-manager.test.js +199 -0
- package/dist/tests/credential-manager.test.js.map +1 -0
- package/dist/tests/slack-client.test.d.ts +2 -0
- package/dist/tests/slack-client.test.d.ts.map +1 -0
- package/dist/tests/slack-client.test.js +741 -0
- package/dist/tests/slack-client.test.js.map +1 -0
- package/dist/tests/types.test.d.ts +2 -0
- package/dist/tests/types.test.d.ts.map +1 -0
- package/dist/tests/types.test.js +215 -0
- package/dist/tests/types.test.js.map +1 -0
- package/dist/types/index.d.ts +369 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +92 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/error-handler.d.ts +2 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +5 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/output.d.ts +2 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +4 -0
- package/dist/utils/output.js.map +1 -0
- package/docs/discord.md +182 -0
- package/docs/slack.md +160 -0
- package/package.json +37 -0
- package/skills/agent-discord/SKILL.md +273 -0
- package/skills/agent-discord/references/authentication.md +294 -0
- package/skills/agent-discord/references/common-patterns.md +455 -0
- package/skills/agent-discord/templates/guild-summary.sh +167 -0
- package/skills/agent-discord/templates/monitor-channel.sh +180 -0
- package/skills/agent-discord/templates/post-message.sh +173 -0
- package/skills/agent-slack/SKILL.md +268 -0
- package/skills/agent-slack/references/authentication.md +332 -0
- package/skills/agent-slack/references/common-patterns.md +527 -0
- package/skills/agent-slack/templates/monitor-channel.sh +186 -0
- package/skills/agent-slack/templates/post-message.sh +130 -0
- package/skills/agent-slack/templates/workspace-summary.sh +149 -0
- package/src/cli.ts +29 -0
- package/src/platforms/discord/cli.ts +36 -0
- package/src/platforms/discord/client.test.ts +456 -0
- package/src/platforms/discord/client.ts +281 -0
- package/src/platforms/discord/commands/auth.test.ts +72 -0
- package/src/platforms/discord/commands/auth.ts +206 -0
- package/src/platforms/discord/commands/channel.test.ts +153 -0
- package/src/platforms/discord/commands/channel.ts +127 -0
- package/src/platforms/discord/commands/file.test.ts +98 -0
- package/src/platforms/discord/commands/file.ts +134 -0
- package/src/platforms/discord/commands/guild.test.ts +117 -0
- package/src/platforms/discord/commands/guild.ts +129 -0
- package/src/platforms/discord/commands/index.ts +8 -0
- package/src/platforms/discord/commands/message.test.ts +107 -0
- package/src/platforms/discord/commands/message.ts +182 -0
- package/src/platforms/discord/commands/reaction.test.ts +123 -0
- package/src/platforms/discord/commands/reaction.ts +156 -0
- package/src/platforms/discord/commands/snapshot.test.ts +29 -0
- package/src/platforms/discord/commands/snapshot.ts +104 -0
- package/src/platforms/discord/commands/user.test.ts +115 -0
- package/src/platforms/discord/commands/user.ts +124 -0
- package/src/platforms/discord/credential-manager.test.ts +173 -0
- package/src/platforms/discord/credential-manager.ts +95 -0
- package/src/platforms/discord/token-extractor.test.ts +918 -0
- package/src/platforms/discord/token-extractor.ts +549 -0
- package/src/platforms/discord/types.test.ts +245 -0
- package/src/platforms/discord/types.ts +158 -0
- package/src/platforms/slack/cli.ts +36 -0
- package/src/platforms/slack/client.ts +466 -0
- package/src/platforms/slack/commands/auth.ts +211 -0
- package/src/platforms/slack/commands/channel.ts +158 -0
- package/src/platforms/slack/commands/file.ts +153 -0
- package/src/platforms/slack/commands/index.ts +8 -0
- package/src/platforms/slack/commands/message.ts +369 -0
- package/src/platforms/slack/commands/reaction.ts +166 -0
- package/src/platforms/slack/commands/snapshot.ts +114 -0
- package/src/platforms/slack/commands/user.ts +110 -0
- package/src/platforms/slack/commands/workspace.ts +111 -0
- package/src/platforms/slack/credential-manager.ts +74 -0
- package/src/platforms/slack/index.ts +2 -0
- package/src/platforms/slack/token-extractor.ts +496 -0
- package/src/platforms/slack/types.ts +193 -0
- package/src/shared/utils/concurrency.test.ts +53 -0
- package/src/shared/utils/concurrency.ts +20 -0
- package/src/shared/utils/error-handler.ts +4 -0
- package/src/shared/utils/output.ts +3 -0
- package/tests/cli.test.ts +94 -0
- package/tests/commands/auth.test.ts +383 -0
- package/tests/commands/channel.test.ts +185 -0
- package/tests/commands/file.test.ts +204 -0
- package/tests/commands/message.test.ts +344 -0
- package/tests/commands/reaction.test.ts +101 -0
- package/tests/commands/snapshot.test.ts +308 -0
- package/tests/commands/user.test.ts +138 -0
- package/tests/commands/workspace.test.ts +528 -0
- package/tests/credential-manager.test.ts +241 -0
- package/tests/slack-client.test.ts +916 -0
- package/tests/types.test.ts +241 -0
- package/tsconfig.json +36 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-discord
|
|
3
|
+
description: Interact with Discord servers - send messages, read channels, manage reactions
|
|
4
|
+
allowed-tools: Bash(agent-discord:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent Discord
|
|
8
|
+
|
|
9
|
+
A TypeScript CLI tool that enables AI agents and humans to interact with Discord servers through a simple command interface. Features seamless token extraction from the Discord desktop app and multi-guild support.
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Extract credentials from Discord desktop app (zero-config)
|
|
15
|
+
agent-discord auth extract
|
|
16
|
+
|
|
17
|
+
# Get guild snapshot
|
|
18
|
+
agent-discord snapshot
|
|
19
|
+
|
|
20
|
+
# Send a message
|
|
21
|
+
agent-discord message send <channel-id> "Hello from AI agent!"
|
|
22
|
+
|
|
23
|
+
# List channels
|
|
24
|
+
agent-discord channel list
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Authentication
|
|
28
|
+
|
|
29
|
+
### Seamless Token Extraction
|
|
30
|
+
|
|
31
|
+
agent-discord automatically extracts your Discord credentials from the desktop app:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Just run this - no manual token copying needed
|
|
35
|
+
agent-discord auth extract
|
|
36
|
+
|
|
37
|
+
# Use --debug for troubleshooting
|
|
38
|
+
agent-discord auth extract --debug
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This command:
|
|
42
|
+
- Auto-detects your platform (macOS/Linux/Windows)
|
|
43
|
+
- Extracts user token from Discord desktop app's LevelDB storage
|
|
44
|
+
- Validates token against Discord API before saving
|
|
45
|
+
- Discovers ALL joined guilds (servers)
|
|
46
|
+
- Stores credentials securely in `~/.config/agent-messenger/`
|
|
47
|
+
|
|
48
|
+
### Multi-Guild Support
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# List all available guilds
|
|
52
|
+
agent-discord guild list
|
|
53
|
+
|
|
54
|
+
# Switch to a different guild
|
|
55
|
+
agent-discord guild switch <guild-id>
|
|
56
|
+
|
|
57
|
+
# Show current guild
|
|
58
|
+
agent-discord guild current
|
|
59
|
+
|
|
60
|
+
# Check auth status
|
|
61
|
+
agent-discord auth status
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Commands
|
|
65
|
+
|
|
66
|
+
### Message Commands
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Send a message
|
|
70
|
+
agent-discord message send <channel-id> <content>
|
|
71
|
+
agent-discord message send 1234567890123456789 "Hello world"
|
|
72
|
+
|
|
73
|
+
# List messages
|
|
74
|
+
agent-discord message list <channel-id>
|
|
75
|
+
agent-discord message list 1234567890123456789 --limit 50
|
|
76
|
+
|
|
77
|
+
# Get a single message by ID
|
|
78
|
+
agent-discord message get <channel-id> <message-id>
|
|
79
|
+
agent-discord message get 1234567890123456789 9876543210987654321
|
|
80
|
+
|
|
81
|
+
# Delete a message
|
|
82
|
+
agent-discord message delete <channel-id> <message-id> --force
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Channel Commands
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# List channels in current guild (text channels only)
|
|
89
|
+
agent-discord channel list
|
|
90
|
+
|
|
91
|
+
# Get channel info
|
|
92
|
+
agent-discord channel info <channel-id>
|
|
93
|
+
agent-discord channel info 1234567890123456789
|
|
94
|
+
|
|
95
|
+
# Get channel history (alias for message list)
|
|
96
|
+
agent-discord channel history <channel-id> --limit 100
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Guild Commands
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# List all guilds
|
|
103
|
+
agent-discord guild list
|
|
104
|
+
|
|
105
|
+
# Get guild info
|
|
106
|
+
agent-discord guild info <guild-id>
|
|
107
|
+
|
|
108
|
+
# Switch active guild
|
|
109
|
+
agent-discord guild switch <guild-id>
|
|
110
|
+
|
|
111
|
+
# Show current guild
|
|
112
|
+
agent-discord guild current
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### User Commands
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# List guild members
|
|
119
|
+
agent-discord user list
|
|
120
|
+
|
|
121
|
+
# Get user info
|
|
122
|
+
agent-discord user info <user-id>
|
|
123
|
+
|
|
124
|
+
# Get current user
|
|
125
|
+
agent-discord user me
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Reaction Commands
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Add reaction (use emoji name without colons)
|
|
132
|
+
agent-discord reaction add <channel-id> <message-id> <emoji>
|
|
133
|
+
agent-discord reaction add 1234567890123456789 9876543210987654321 thumbsup
|
|
134
|
+
|
|
135
|
+
# Remove reaction
|
|
136
|
+
agent-discord reaction remove <channel-id> <message-id> <emoji>
|
|
137
|
+
|
|
138
|
+
# List reactions on a message
|
|
139
|
+
agent-discord reaction list <channel-id> <message-id>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### File Commands
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Upload file
|
|
146
|
+
agent-discord file upload <channel-id> <path>
|
|
147
|
+
agent-discord file upload 1234567890123456789 ./report.pdf
|
|
148
|
+
|
|
149
|
+
# List files in channel
|
|
150
|
+
agent-discord file list <channel-id>
|
|
151
|
+
|
|
152
|
+
# Get file info
|
|
153
|
+
agent-discord file info <channel-id> <file-id>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Snapshot Command
|
|
157
|
+
|
|
158
|
+
Get comprehensive guild state for AI agents:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# Full snapshot
|
|
162
|
+
agent-discord snapshot
|
|
163
|
+
|
|
164
|
+
# Filtered snapshots
|
|
165
|
+
agent-discord snapshot --channels-only
|
|
166
|
+
agent-discord snapshot --users-only
|
|
167
|
+
|
|
168
|
+
# Limit messages per channel
|
|
169
|
+
agent-discord snapshot --limit 10
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Returns JSON with:
|
|
173
|
+
- Guild metadata (id, name)
|
|
174
|
+
- Channels (id, name, type, topic)
|
|
175
|
+
- Recent messages (id, content, author, timestamp)
|
|
176
|
+
- Members (id, username, global_name)
|
|
177
|
+
|
|
178
|
+
## Output Format
|
|
179
|
+
|
|
180
|
+
### JSON (Default)
|
|
181
|
+
|
|
182
|
+
All commands output JSON by default for AI consumption:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"id": "1234567890123456789",
|
|
187
|
+
"content": "Hello world",
|
|
188
|
+
"author": "username",
|
|
189
|
+
"timestamp": "2024-01-15T10:30:00.000Z"
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Pretty (Human-Readable)
|
|
194
|
+
|
|
195
|
+
Use `--pretty` flag for formatted output:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
agent-discord channel list --pretty
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Key Differences from Slack
|
|
202
|
+
|
|
203
|
+
| Feature | Discord | Slack |
|
|
204
|
+
|---------|---------|-------|
|
|
205
|
+
| Server terminology | Guild | Workspace |
|
|
206
|
+
| Channel identifiers | Snowflake IDs | Channel name or ID |
|
|
207
|
+
| Message identifiers | Snowflake IDs | Timestamps (ts) |
|
|
208
|
+
| Threads | Thread ID field | Thread timestamp |
|
|
209
|
+
| Mentions | `<@user_id>` | `<@USER_ID>` |
|
|
210
|
+
|
|
211
|
+
**Important**: Discord uses Snowflake IDs (large numbers like `1234567890123456789`) for all identifiers. You cannot use channel names directly - use `channel list` to find IDs first.
|
|
212
|
+
|
|
213
|
+
## Common Patterns
|
|
214
|
+
|
|
215
|
+
See `references/common-patterns.md` for typical AI agent workflows.
|
|
216
|
+
|
|
217
|
+
## Templates
|
|
218
|
+
|
|
219
|
+
See `templates/` directory for runnable examples:
|
|
220
|
+
- `post-message.sh` - Send messages with error handling
|
|
221
|
+
- `monitor-channel.sh` - Monitor channel for new messages
|
|
222
|
+
- `guild-summary.sh` - Generate guild summary
|
|
223
|
+
|
|
224
|
+
## Error Handling
|
|
225
|
+
|
|
226
|
+
All commands return consistent error format:
|
|
227
|
+
|
|
228
|
+
```json
|
|
229
|
+
{
|
|
230
|
+
"error": "Not authenticated. Run \"auth extract\" first."
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Common errors:
|
|
235
|
+
- `Not authenticated`: No valid token - run `auth extract`
|
|
236
|
+
- `No current guild set`: Run `guild switch <id>` first
|
|
237
|
+
- `Message not found`: Invalid message ID
|
|
238
|
+
- `Unknown Channel`: Invalid channel ID
|
|
239
|
+
|
|
240
|
+
## Configuration
|
|
241
|
+
|
|
242
|
+
Credentials stored in: `~/.config/agent-messenger/discord-credentials.json`
|
|
243
|
+
|
|
244
|
+
Format:
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"token": "user_token_here",
|
|
248
|
+
"current_guild": "1234567890123456789",
|
|
249
|
+
"guilds": {
|
|
250
|
+
"1234567890123456789": {
|
|
251
|
+
"guild_id": "1234567890123456789",
|
|
252
|
+
"guild_name": "My Server"
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**Security**: File permissions set to 0600 (owner read/write only)
|
|
259
|
+
|
|
260
|
+
## Limitations
|
|
261
|
+
|
|
262
|
+
- No real-time events / Gateway connection
|
|
263
|
+
- No voice channel support
|
|
264
|
+
- No server management (create/delete channels, roles)
|
|
265
|
+
- No slash commands
|
|
266
|
+
- No webhook support
|
|
267
|
+
- Plain text messages only (no embeds in v1)
|
|
268
|
+
- User tokens only (no bot tokens)
|
|
269
|
+
|
|
270
|
+
## References
|
|
271
|
+
|
|
272
|
+
- [Authentication Guide](references/authentication.md)
|
|
273
|
+
- [Common Patterns](references/common-patterns.md)
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
# Authentication Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
agent-discord uses Discord's user token extracted directly from the Discord desktop application. This provides seamless authentication without manual token management.
|
|
6
|
+
|
|
7
|
+
## Token Extraction
|
|
8
|
+
|
|
9
|
+
### Automatic Extraction
|
|
10
|
+
|
|
11
|
+
The simplest way to authenticate:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
agent-discord auth extract
|
|
15
|
+
|
|
16
|
+
# Use --debug for troubleshooting extraction issues
|
|
17
|
+
agent-discord auth extract --debug
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This command:
|
|
21
|
+
1. Detects your operating system (macOS, Linux, Windows)
|
|
22
|
+
2. Locates the Discord desktop app data directory
|
|
23
|
+
3. Reads the LevelDB storage containing session data
|
|
24
|
+
4. Extracts user token
|
|
25
|
+
5. Validates token against Discord API before saving
|
|
26
|
+
6. Discovers ALL joined guilds (servers)
|
|
27
|
+
7. Stores credentials securely in `~/.config/agent-messenger/discord-credentials.json`
|
|
28
|
+
|
|
29
|
+
### Platform-Specific Paths
|
|
30
|
+
|
|
31
|
+
**macOS:**
|
|
32
|
+
```
|
|
33
|
+
~/Library/Application Support/discord/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Linux:**
|
|
37
|
+
```
|
|
38
|
+
~/.config/discord/
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Windows:**
|
|
42
|
+
```
|
|
43
|
+
%APPDATA%\discord\
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The tool searches within:
|
|
47
|
+
- `Local Storage/leveldb/` - Primary token storage
|
|
48
|
+
|
|
49
|
+
### What Gets Extracted
|
|
50
|
+
|
|
51
|
+
- **token**: User token (starts with a base64-encoded user ID)
|
|
52
|
+
- **guilds**: All servers you're a member of
|
|
53
|
+
|
|
54
|
+
## Multi-Guild Management
|
|
55
|
+
|
|
56
|
+
### List Guilds
|
|
57
|
+
|
|
58
|
+
See all available guilds:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
agent-discord guild list
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Output:
|
|
65
|
+
```json
|
|
66
|
+
[
|
|
67
|
+
{
|
|
68
|
+
"id": "1234567890123456789",
|
|
69
|
+
"name": "My Server",
|
|
70
|
+
"current": true
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "9876543210987654321",
|
|
74
|
+
"name": "Another Server",
|
|
75
|
+
"current": false
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Switch Guild
|
|
81
|
+
|
|
82
|
+
Change the active guild:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
agent-discord guild switch 9876543210987654321
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
All subsequent commands will use the selected guild until you switch again.
|
|
89
|
+
|
|
90
|
+
### Current Guild
|
|
91
|
+
|
|
92
|
+
Check which guild is active:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
agent-discord guild current
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Credential Storage
|
|
99
|
+
|
|
100
|
+
### Location
|
|
101
|
+
|
|
102
|
+
Credentials are stored in:
|
|
103
|
+
```
|
|
104
|
+
~/.config/agent-messenger/discord-credentials.json
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Format
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"token": "user_token_here",
|
|
112
|
+
"current_guild": "1234567890123456789",
|
|
113
|
+
"guilds": {
|
|
114
|
+
"1234567890123456789": {
|
|
115
|
+
"guild_id": "1234567890123456789",
|
|
116
|
+
"guild_name": "My Server"
|
|
117
|
+
},
|
|
118
|
+
"9876543210987654321": {
|
|
119
|
+
"guild_id": "9876543210987654321",
|
|
120
|
+
"guild_name": "Another Server"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Security
|
|
127
|
+
|
|
128
|
+
- File permissions: `0600` (owner read/write only)
|
|
129
|
+
- Tokens are stored in plaintext (same as Discord desktop app)
|
|
130
|
+
- Keep this file secure - it grants full access to your Discord account
|
|
131
|
+
|
|
132
|
+
## Authentication Status
|
|
133
|
+
|
|
134
|
+
Check if you're authenticated:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
agent-discord auth status
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Output when authenticated:
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"authenticated": true,
|
|
144
|
+
"user": "username",
|
|
145
|
+
"current_guild": "1234567890123456789",
|
|
146
|
+
"guilds_count": 5
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Output when not authenticated:
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"error": "Not authenticated. Run \"auth extract\" first."
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Token Lifecycle
|
|
158
|
+
|
|
159
|
+
### When Tokens Expire
|
|
160
|
+
|
|
161
|
+
Discord user tokens can be invalidated when:
|
|
162
|
+
- You change your password
|
|
163
|
+
- You enable/disable 2FA
|
|
164
|
+
- Discord forces a logout
|
|
165
|
+
- You manually log out of the desktop app
|
|
166
|
+
|
|
167
|
+
### Re-authentication
|
|
168
|
+
|
|
169
|
+
If commands start failing with auth errors:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Re-extract credentials
|
|
173
|
+
agent-discord auth extract
|
|
174
|
+
|
|
175
|
+
# Verify it worked
|
|
176
|
+
agent-discord auth status
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Troubleshooting
|
|
180
|
+
|
|
181
|
+
### Using Debug Mode
|
|
182
|
+
|
|
183
|
+
For any extraction issues, run with `--debug` to see detailed information:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
agent-discord auth extract --debug
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
This shows:
|
|
190
|
+
- Which Discord directory was found
|
|
191
|
+
- Token extraction progress
|
|
192
|
+
- Token validation results
|
|
193
|
+
- Guild discovery details
|
|
194
|
+
|
|
195
|
+
### "Discord desktop app not found"
|
|
196
|
+
|
|
197
|
+
**Cause**: Discord desktop app not installed or in non-standard location
|
|
198
|
+
|
|
199
|
+
**Solution**:
|
|
200
|
+
1. Install Discord desktop app
|
|
201
|
+
2. Log in to your account
|
|
202
|
+
3. Run `agent-discord auth extract` again
|
|
203
|
+
|
|
204
|
+
### "No Discord token found"
|
|
205
|
+
|
|
206
|
+
**Cause**: Not logged into Discord or token storage corrupted
|
|
207
|
+
|
|
208
|
+
**Solution**:
|
|
209
|
+
1. Open Discord desktop app
|
|
210
|
+
2. Make sure you're logged in (can see your servers)
|
|
211
|
+
3. Run `agent-discord auth extract --debug` to see details
|
|
212
|
+
|
|
213
|
+
### "Permission denied reading Discord data"
|
|
214
|
+
|
|
215
|
+
**Cause**: Insufficient file system permissions
|
|
216
|
+
|
|
217
|
+
**Solution** (macOS):
|
|
218
|
+
1. Grant Terminal/iTerm full disk access in System Preferences
|
|
219
|
+
2. Security & Privacy -> Privacy -> Full Disk Access
|
|
220
|
+
3. Add your terminal application
|
|
221
|
+
|
|
222
|
+
### "Token validation failed" errors
|
|
223
|
+
|
|
224
|
+
**Cause**: Token expired or invalidated
|
|
225
|
+
|
|
226
|
+
**Solution**:
|
|
227
|
+
```bash
|
|
228
|
+
# Re-extract fresh credentials
|
|
229
|
+
agent-discord auth extract
|
|
230
|
+
|
|
231
|
+
# Test authentication
|
|
232
|
+
agent-discord auth status
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Security Considerations
|
|
236
|
+
|
|
237
|
+
### What agent-discord Can Access
|
|
238
|
+
|
|
239
|
+
With extracted credentials, agent-discord has the same permissions as you in Discord:
|
|
240
|
+
- Read all channels you have access to
|
|
241
|
+
- Send messages as you
|
|
242
|
+
- Upload/download files
|
|
243
|
+
- Manage reactions
|
|
244
|
+
- Access user information
|
|
245
|
+
- View server member lists
|
|
246
|
+
|
|
247
|
+
### What agent-discord Cannot Do
|
|
248
|
+
|
|
249
|
+
- Access channels you don't have permission for
|
|
250
|
+
- Perform admin operations (unless you're an admin)
|
|
251
|
+
- Access other users' DMs without existing conversation
|
|
252
|
+
- Manage server settings (not implemented)
|
|
253
|
+
|
|
254
|
+
### Best Practices
|
|
255
|
+
|
|
256
|
+
1. **Protect credentials.json**: Never commit to version control
|
|
257
|
+
2. **Use guild switching**: Keep different contexts separate
|
|
258
|
+
3. **Re-extract periodically**: Keep tokens fresh
|
|
259
|
+
4. **Revoke if compromised**: Change your Discord password to invalidate tokens
|
|
260
|
+
|
|
261
|
+
## Manual Token Management (Advanced)
|
|
262
|
+
|
|
263
|
+
If automatic extraction fails, you can manually create credentials:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
# Create config directory
|
|
267
|
+
mkdir -p ~/.config/agent-messenger
|
|
268
|
+
|
|
269
|
+
# Create credentials file
|
|
270
|
+
cat > ~/.config/agent-messenger/discord-credentials.json << 'EOF'
|
|
271
|
+
{
|
|
272
|
+
"token": "YOUR_TOKEN_HERE",
|
|
273
|
+
"current_guild": "1234567890123456789",
|
|
274
|
+
"guilds": {
|
|
275
|
+
"1234567890123456789": {
|
|
276
|
+
"guild_id": "1234567890123456789",
|
|
277
|
+
"guild_name": "My Server"
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
EOF
|
|
282
|
+
|
|
283
|
+
# Set secure permissions
|
|
284
|
+
chmod 600 ~/.config/agent-messenger/discord-credentials.json
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
To find your token manually:
|
|
288
|
+
1. Open Discord in browser (not desktop app)
|
|
289
|
+
2. Open DevTools -> Network tab
|
|
290
|
+
3. Make any API call (send message, etc.)
|
|
291
|
+
4. Find request to `discord.com/api`
|
|
292
|
+
5. Copy `Authorization` header value
|
|
293
|
+
|
|
294
|
+
**Warning**: Self-botting (using user tokens for automation) may violate Discord's Terms of Service. Use responsibly and at your own risk.
|