Fix CreateGuildAsync not sending icon stream. (#768)
* Fix CreateGuildAsync not doing anything with the input stream for the guild icon. Also fixes an issue with potential stream types that throw a NotSupportedException when checking its properties. [Apparently, they exist.](https://github.com/dotnet/corefx/blob/master/src/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseStream.cs) * Merged with old method * Removed duplicate decl
This commit is contained in:
committed by
RogueException
parent
506a6c96c9
commit
865080add9
@@ -120,6 +120,9 @@ namespace Discord.Rest
|
||||
string name, IVoiceRegion region, Stream jpegIcon, RequestOptions options)
|
||||
{
|
||||
var args = new CreateGuildParams(name, region.Id);
|
||||
if (jpegIcon != null)
|
||||
args.Icon = new API.Image(jpegIcon);
|
||||
|
||||
var model = await client.ApiClient.CreateGuildAsync(args, options).ConfigureAwait(false);
|
||||
return RestGuild.Create(client, model);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user