From d12cd481f6f94eebf22dfafb7c3720e0351f09ae Mon Sep 17 00:00:00 2001 From: rladenson <78043712+rladenson@users.noreply.github.com> Date: Tue, 18 Jul 2023 13:23:52 -0600 Subject: [PATCH] fix(bot): add warnings on setting avatar when proxyavatar is set (#572) --- PluralKit.Bot/Commands/MemberAvatar.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/Commands/MemberAvatar.cs b/PluralKit.Bot/Commands/MemberAvatar.cs index bcf1b3c0..d5f5f544 100644 --- a/PluralKit.Bot/Commands/MemberAvatar.cs +++ b/PluralKit.Bot/Commands/MemberAvatar.cs @@ -150,12 +150,17 @@ public class MemberAvatar { MemberAvatarLocation.Server => $" This avatar will now be used when proxying in this server (**{ctx.Guild.Name}**).", - MemberAvatarLocation.Member when targetGuildData?.AvatarUrl != null => - $"\n{Emojis.Note} Note that this member *also* has a server-specific avatar set in this server (**{ctx.Guild.Name}**), and thus changing the global avatar will have no effect here.", MemberAvatarLocation.MemberWebhook when targetGuildData?.AvatarUrl != null => $" This avatar will now be used for this member's proxied messages, instead of their main avatar.\n{Emojis.Note} Note that this member *also* has a server-specific avatar set in this server (**{ctx.Guild.Name}**), and thus changing the global avatar will have no effect here.", MemberAvatarLocation.MemberWebhook => $" This avatar will now be used for this member's proxied messages, instead of their main avatar.", + MemberAvatarLocation.Member when (targetGuildData?.AvatarUrl != null && target.WebhookAvatarUrl != null) => + $"\n{Emojis.Note} Note that this member *also* has a server-specific avatar set in this server (**{ctx.Guild.Name}**), and thus changing the global avatar will have no effect here." + + $"\n{Emojis.Note} Note that this member *also* has a proxy avatar set, and thus the global avatar will also have no effect on proxied messages in servers without server-specific avatars.", + MemberAvatarLocation.Member when targetGuildData?.AvatarUrl != null => + $"\n{Emojis.Note} Note that this member *also* has a server-specific avatar set in this server (**{ctx.Guild.Name}**), and thus changing the global avatar will have no effect here.", + MemberAvatarLocation.Member when target.WebhookAvatarUrl != null => + $"\n{Emojis.Note} Note that this member *also* has a proxy avatar set, and thus changing the global avatar will have no effect on proxied messages.", _ => "" };