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

Error sending file #3356

Open
Mrgaton opened this issue Mar 26, 2023 · 1 comment
Open

Error sending file #3356

Mrgaton opened this issue Mar 26, 2023 · 1 comment

Comments

@Mrgaton
Copy link

Mrgaton commented Mar 26, 2023

System.ArgumentException: The value cannot be null or empty. (Parameter 'mediaType')
at System.Net.Http.Headers.MediaTypeHeaderValue.CheckMediaTypeFormat(String mediaType, String parameterName)
at System.Net.Http.StringContent..ctor(String content, Encoding encoding, String mediaType)
at Discord.DiscordHttpClient.MakeMultipartFormDataContent(MessageProperties props)
at Discord.DiscordHttpClient.PostAsync(String endpoint, MessageProperties props)
at Discord.MessageExtensions.SendMessageAsync(DiscordClient client, UInt64 channelId, MessageProperties properties)
at Discord.MessageExtensions.SendFileAsync(DiscordClient client, UInt64 channelId, String fileName, Byte[] fileData, String message, Boolean tts)
at Discord.MinimalTextChannel.SendFileAsync(String fileName, Byte[] fileData, String message, Boolean tts)
at Discord.MinimalTextChannel.SendFile(String fileName, Byte[] fileData, String message, Boolean tts)

@Mrgaton
Copy link
Author

Mrgaton commented Mar 26, 2023

Using net 7

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

No branches or pull requests

1 participant