chore: add discord example - #25
Conversation
| @@ -0,0 +1,6 @@ | |||
| --- | |||
| '@callstack/byorg-discord': minor | |||
| 'discord-example': patch | |||
There was a problem hiding this comment.
[nit] implementing example actually accounts as a minor ;-)
| 'discord-example': patch | |
| 'discord-example': minor |
| @@ -15,13 +15,14 @@ | |||
| "dependencies": { | |||
| "@ai-sdk/openai": "^1.0.2", | |||
| "@callstack/byorg-core": "0.4.2", | |||
There was a problem hiding this comment.
can you replace all 0.4.2 references with workspace (in every package)? There was a bug if you released it with changeset, but now we do release it with pnpm so we can use workspace
| { | ||
| "name": "@callstack/byorg-discord", | ||
| "version": "0.4.2", | ||
| "version": "0.4.3", |
There was a problem hiding this comment.
Leave version updating to changset
| start: () => Promise<string>; | ||
| }; | ||
|
|
||
| export type DiscordClient = Client & ClientStart; |
There was a problem hiding this comment.
Add code comment documenting this hack
| }); | ||
|
|
||
| await client.login(botToken); | ||
| client.start = () => { |
There was a problem hiding this comment.
Why are we adding methods to existing discord object?
There was a problem hiding this comment.
To make usage of discord the same as slack, and to abstract away the "login" method that takes in the bot token as an argument.
| }); | ||
|
|
||
| await client.login(botToken); | ||
| client.start = () => { |
There was a problem hiding this comment.
I do not see any code in this PR actually calling this method. Is it needed?
mdjastrzebski
left a comment
There was a problem hiding this comment.
I have some questions in the comments
Summary
new example for discord integration
Test plan
tested with discord