Skip to content

Fix CreateMessageRequest not being able to send text messages to channel #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2024

Conversation

surajkumar
Copy link
Contributor

@surajkumar surajkumar commented May 22, 2024

The following command was failing:

guild.channel()
        .createMessage(new CreateMessageBuilder(message.channelId()).content("Hello World!"))
        .onError(System.err::println)
        .onSuccess(System.out::println);

With the error: {"message": "Cannot send an empty message", "code": 50006}

This was happening because we were trying to send a multi part body for regular text messages. The sending of files needs further testing however for now I have fixed our ability to send regular text messages to channels.

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@surajkumar surajkumar requested a review from a team May 22, 2024 19:09
@surajkumar surajkumar merged commit b89c512 into main May 22, 2024
4 checks passed
@surajkumar surajkumar deleted the fix-sending-message branch May 22, 2024 20:02
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