Skip to content

Commit

Permalink
Incorrect variable assignment (#959)
Browse files Browse the repository at this point in the history
The username parameter was being used to set args.AvatarUrl as opposed to the actual avatarUrl parameter provided
  • Loading branch information
Anu6is authored and foxbot committed Feb 22, 2018
1 parent 500f5f4 commit 8876597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Discord.Net.Webhook/WebhookClientHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static async Task<ulong> SendFileAsync(DiscordWebhookClient client, Strea
if (username != null)
args.Username = username;
if (avatarUrl != null)
args.AvatarUrl = username;
args.AvatarUrl = avatarUrl;
if (embeds != null)
args.Embeds = embeds.Select(x => x.ToModel()).ToArray();
var msg = await client.ApiClient.UploadWebhookFileAsync(client.Webhook.Id, args, options).ConfigureAwait(false);
Expand Down

0 comments on commit 8876597

Please sign in to comment.