Skip to content
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

Implement inline replies feature #1408

Merged
merged 14 commits into from
Nov 21, 2020
Merged

Conversation

MinnDevelopment
Copy link
Member

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

discord/discord-api-docs#2118

@RedDaedalus

This comment has been minimized.

* <br>This is identical to {@code message.getChannel().sendFile(data, name, options).reference(message)}.
* You can use {@link MessageAction#mentionRepliedUser(boolean) mentionRepliedUser(false)} to not mention the author of the message.
*
* <p>For further info, see {@link MessageChannel#sendFile(File, net.dv8tion.jda.api.utils.AttachmentOption...)} and {@link MessageAction#reference(Message)}.
Copy link
Member Author

@MinnDevelopment MinnDevelopment Nov 15, 2020

Choose a reason for hiding this comment

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

Fix this link (and others)

Not every mention is included in the content so this is necessary
Inline replies use mentions which are not in the content,
this would fail only when the guild is loaded (due to our handling)
@sebm253

This comment has been minimized.

@MinnDevelopment MinnDevelopment merged commit 2ccd6b9 into development Nov 21, 2020
@MinnDevelopment MinnDevelopment deleted the feature/message-reference branch November 21, 2020 00:16
{
obj.put("allowed_mentions", getAllowedMentionsObj());
obj.put("message_reference", DataObject.empty()
Copy link
Contributor

Choose a reason for hiding this comment

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

Just tested this. Not sure is that an issue or not, but replying is not working in case of just sending a file without any other message content.

In this case rest action ignores this payload_json as it thinks it's empty so message_reference never sent to the Discord with a file.

Copy link
Member Author

Choose a reason for hiding this comment

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

This has been fixed

@MinnDevelopment MinnDevelopment added this to the v4.2.1 milestone Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants