fix: don't show discord user's guild nickname if not allowed to see message content
This commit is contained in:
parent
917aacc4f4
commit
183779e055
@ -351,7 +351,7 @@ public class EmbedService
|
|||||||
|
|
||||||
// Calculate string displayed under "Sent by"
|
// Calculate string displayed under "Sent by"
|
||||||
string userStr;
|
string userStr;
|
||||||
if (memberInfo != null && memberInfo.Nick != null)
|
if (showContent && memberInfo != null && memberInfo.Nick != null)
|
||||||
userStr = $"**Username:** {userInfo.NameAndMention()}\n**Nickname:** {memberInfo.Nick}";
|
userStr = $"**Username:** {userInfo.NameAndMention()}\n**Nickname:** {memberInfo.Nick}";
|
||||||
else if (userInfo != null) userStr = userInfo.NameAndMention();
|
else if (userInfo != null) userStr = userInfo.NameAndMention();
|
||||||
else userStr = $"*(deleted user {msg.Message.Sender})*";
|
else userStr = $"*(deleted user {msg.Message.Sender})*";
|
||||||
|
Loading…
Reference in New Issue
Block a user