fix: don't show discord user's guild nickname if not allowed to see message content

This commit is contained in:
spiral 2022-04-24 14:43:27 -04:00
parent 917aacc4f4
commit 183779e055
No known key found for this signature in database
GPG Key ID: 244A11E4B0BCF40E

View File

@ -351,7 +351,7 @@ public class EmbedService
// Calculate string displayed under "Sent by"
string userStr;
if (memberInfo != null && memberInfo.Nick != null)
if (showContent && memberInfo != null && memberInfo.Nick != null)
userStr = $"**Username:** {userInfo.NameAndMention()}\n**Nickname:** {memberInfo.Nick}";
else if (userInfo != null) userStr = userInfo.NameAndMention();
else userStr = $"*(deleted user {msg.Message.Sender})*";