Skip to content

[Internal] Discord send and retrieve messages#2

Open
russelj1 wants to merge 11 commits into
mainfrom
agentflow-v2-discord
Open

[Internal] Discord send and retrieve messages#2
russelj1 wants to merge 11 commits into
mainfrom
agentflow-v2-discord

Conversation

@russelj1

@russelj1 russelj1 commented Jun 7, 2025

Copy link
Copy Markdown

No description provided.

@russelj1
russelj1 requested a review from jmorahan June 7, 2025 11:38
@russelj1

Copy link
Copy Markdown
Author

Test have been added

% cd packages/components
% pnpm test

flowise-components@3.0.1 test flowise/invotra-flowise/Flowise/packages/components
jest --runInBand --detectOpenHandles --forceExit

PASS test/nodes/agentflow/discord/discord.send.test.ts (28.396 s)
DiscordMessageSend
✓ throws if channelId is missing (18 ms)
✓ throws if neither content nor embed is provided (1 ms)
✓ sends a plain text message successfully (3 ms)
✓ builds an embed when embed fields are set (2 ms)

PASS test/nodes/agentflow/discord/discord.retrieve.test.ts
DiscordMessageRetrieve
✓ throws if multiple pagination params are set (16 ms)
✓ retrieves recent messages by default (3 ms)

PASS test/nodes/agentflow/discord/discord.utils.test.ts
getErrorMessage
✓ formats network errors (1 ms)
✓ handles 403 Forbidden (1 ms)
✓ rate limit contains retry-after (1 ms)
✓ falls back to generic (1 ms)

Test Suites: 3 passed, 3 total
Tests: 10 passed, 10 total
Snapshots: 0 total
Time: 31.061 s
Ran all test suites.

Comment thread packages/components/credentials/DiscordApi.credential.ts Outdated
Comment thread packages/components/nodes/agentflow/Discord/discord.svg
Comment thread packages/components/nodes/agentflow/Discord/README.md Outdated
Comment thread packages/components/nodes/agentflow/Discord/messages/Retrieve.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants