From 88765970ec80bcce8cf8dc59fd6812f7005dad50 Mon Sep 17 00:00:00 2001 From: Anu6is Date: Thu, 22 Feb 2018 16:02:47 -0500 Subject: [PATCH] Incorrect variable assignment (#959) The username parameter was being used to set args.AvatarUrl as opposed to the actual avatarUrl parameter provided --- src/Discord.Net.Webhook/WebhookClientHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.Webhook/WebhookClientHelper.cs b/src/Discord.Net.Webhook/WebhookClientHelper.cs index f3a3984cf1..1116662a69 100644 --- a/src/Discord.Net.Webhook/WebhookClientHelper.cs +++ b/src/Discord.Net.Webhook/WebhookClientHelper.cs @@ -49,7 +49,7 @@ public static async Task 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);