Skip to content

Prevent sending empty discord messages#25

Closed
odilitime wants to merge 2 commits intoodi-embedsfrom
1.x
Closed

Prevent sending empty discord messages#25
odilitime wants to merge 2 commits intoodi-embedsfrom
1.x

Conversation

@odilitime
Copy link
Member

@odilitime odilitime commented Nov 21, 2025

Add a guard to the DM response handler to prevent sending empty messages to Discord.


Open in Cursor Open in Web


Note

Prevents sending empty Discord DMs by checking for non-whitespace text or attachments before sending.

  • Discord Messaging (src/messages.ts):
    • DM handling: Add guard to skip sending when both content.text is empty/whitespace and no attachments; log a warning and return early.
    • Normalize text handling by using textContent = content.text ?? '' for DM content field.

Written by Cursor Bugbot for commit 54c15c3. This will update automatically on new commits. Configure here.

odilitime and others added 2 commits November 20, 2025 22:41
Discord slash commands interface, modal interaction enhancements, attachment fixes
@cursor
Copy link

cursor bot commented Nov 21, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 21, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 1.x

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@odilitime odilitime marked this pull request as ready for review November 21, 2025 06:47
@odilitime odilitime closed this Nov 21, 2025
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