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

Issue when sending a file with a text in a channel. The text is not sent. #987

Closed
FenikkusuKoneko opened this issue Mar 19, 2018 · 1 comment
Labels

Comments

@FenikkusuKoneko
Copy link

Hi! I'm using beta2 version. I just figured out that from v.00900 to v.00908 sending a text before sending a file is not working.

@SubZero0
Copy link
Member

SubZero0 commented Mar 19, 2018

Just confirming that this issue is reproducible.
Example:
Context.Channel.SendFileAsync("test/test.png", "some text");
< 900: Sends the image and the text.
>= 900: Sends only the image.

Related to #978

@FenikkusuKoneko FenikkusuKoneko changed the title Text before sending a file Issue when sending a file with a text in a channel. The text is not sent. Mar 19, 2018
@foxbot foxbot added the bug label Mar 19, 2018
@foxbot foxbot closed this as completed in ac5ecd3 Mar 19, 2018
FiniteReality pushed a commit to FiniteReality/Discord.Net that referenced this issue May 5, 2018
This resolves discord-net#987

Previous behavior was that even if `null` was passed for an embed in
UploadFileAsync, the Embed property on UploadFileArgs was still
specified - this meant we were always sending a payload_json.

If a payload_json is specified, it seems like Discord will only read
from the payload_json, and will ignore properties set outside of it.

To prevent unnecessary code duplication, this commit always specifies
parameters in the payload_json, and also will only include the embed if
one was actually specified with real data (not null).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants