Depreciated client.sendToChannel function#22
Conversation
|
@decker82 is attempting to deploy a commit to the blstmo's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThis change adds a deprecation warning to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/fluxer-core/src/client/Client.ts (1)
283-287: Optional: add a@exampletag to match thefetchMessagedeprecation pattern.The
fetchMessageJSDoc includes a@exampleblock showing the replacement API in use. Adding one here improves migration guidance for consumers.📝 Suggested JSDoc addition
/** * Send a message to any channel by ID. Shorthand for client.channels.send(). * Works even when the channel is not cached. * `@deprecated` Use client.channels.send(channelId, payload). + * `@example` + * // Before (deprecated) + * await client.sendToChannel(channelId, { content: 'Hello!' }); + * // After + * await client.channels.send(channelId, { content: 'Hello!' }); */🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/fluxer-core/src/client/Client.ts` around lines 283 - 287, Add a `@example` JSDoc to the deprecated method in Client.ts that demonstrates the replacement API; update the JSDoc for the send shorthand (the deprecated method described in the comment block) to include a short example showing how to call client.channels.send(channelId, payload) so consumers can see the direct migration path from the deprecated send(...) to client.channels.send(...).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/fluxer-core/src/client/Client.ts`:
- Around line 283-287: Add a `@example` JSDoc to the deprecated method in
Client.ts that demonstrates the replacement API; update the JSDoc for the send
shorthand (the deprecated method described in the comment block) to include a
short example showing how to call client.channels.send(channelId, payload) so
consumers can see the direct migration path from the deprecated send(...) to
client.channels.send(...).
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
Description
Depreciated client.sendToChannel function as its outdated and prompted to use client.channels.send(channelId, payload) instead.
Type of change
Checklist
pnpm run lint)pnpm run buildsuccessfullypnpm run testsuccessfullySummary by CodeRabbit