Check for avatar whitespace instead of null.

This may be relevant for #206, although unsure if this is actually a fix.
This commit is contained in:
Ske 2020-07-28 19:35:34 +02:00
parent 47fcfeca0f
commit 62cdb8a9b8
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ namespace PluralKit.Bot
dwb.WithUsername(FixClyde(name).Truncate(80));
dwb.WithContent(content);
dwb.AddMentions(content.ParseAllMentions(allowEveryone, channel.Guild));
if (avatarUrl != null) dwb.WithAvatarUrl(avatarUrl);
if (!string.IsNullOrWhiteSpace(avatarUrl))
dwb.WithAvatarUrl(avatarUrl);
var attachmentChunks = ChunkAttachmentsOrThrow(attachments, 8 * 1024 * 1024);
if (attachmentChunks.Count > 0)