Skip to content

Depreciated client.sendToChannel function#22

Merged
blstmo merged 1 commit intofluxerjs:mainfrom
decker82:main
Feb 24, 2026
Merged

Depreciated client.sendToChannel function#22
blstmo merged 1 commit intofluxerjs:mainfrom
decker82:main

Conversation

@decker82
Copy link
Contributor

@decker82 decker82 commented Feb 23, 2026

Description

Depreciated client.sendToChannel function as its outdated and prompted to use client.channels.send(channelId, payload) instead.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • My code follows the project's style guidelines (run pnpm run lint)
  • I have run pnpm run build successfully
  • I have run pnpm run test successfully

Summary by CodeRabbit

  • Deprecations
    • Client.sendToChannel() is now deprecated. Migrate to client.channels.send() for future compatibility. Deprecation warnings will be emitted when using the old method.

@vercel
Copy link

vercel bot commented Feb 23, 2026

@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.

@coderabbitai
Copy link

coderabbitai bot commented Feb 23, 2026

📝 Walkthrough

Walkthrough

This change adds a deprecation warning to the Client.sendToChannel() method and updates its JSDoc to direct users toward the alternative client.channels.send() API. The method's underlying implementation remains unchanged; only runtime behavior and documentation are updated.

Changes

Cohort / File(s) Summary
Deprecation Notice
packages/fluxer-core/src/client/Client.ts
Added emitDeprecationWarning call to Client.sendToChannel() and updated JSDoc to mark method as deprecated, recommending use of client.channels.send() instead. No functional changes to the method logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 A warning whispers through the code,
"This path grows old, a lighter load,"
Use channels now, the newer way,
The old method fades away!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Depreciated client.sendToChannel function' contains a spelling error ('Depreciated' should be 'Deprecated') and accurately describes the main change of deprecating the sendToChannel method.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/fluxer-core/src/client/Client.ts (1)

283-287: Optional: add a @example tag to match the fetchMessage deprecation pattern.

The fetchMessage JSDoc includes a @example block 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(...).

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2a449c4 and 2beb119.

📒 Files selected for processing (1)
  • packages/fluxer-core/src/client/Client.ts

@codecov
Copy link

codecov bot commented Feb 23, 2026

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 ☂️

@blstmo blstmo merged commit 2108549 into fluxerjs:main Feb 24, 2026
9 of 10 checks passed
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