mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-20 00:43:36 +03:00
Properly check for nickname presence
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
2b573ecb1a
commit
b3b2a16aad
1 changed files with 3 additions and 3 deletions
|
@ -25,8 +25,8 @@ public class ToolsCommandGroup : CommandGroup
|
|||
{
|
||||
private readonly ICommandContext _context;
|
||||
private readonly FeedbackService _feedback;
|
||||
private readonly GuildDataService _guildData;
|
||||
private readonly IDiscordRestGuildAPI _guildApi;
|
||||
private readonly GuildDataService _guildData;
|
||||
private readonly IDiscordRestUserAPI _userApi;
|
||||
|
||||
public ToolsCommandGroup(
|
||||
|
@ -153,10 +153,10 @@ public class ToolsCommandGroup : CommandGroup
|
|||
|
||||
private static void AppendGuildInformation(IGuildMember guildMember, StringBuilder builder)
|
||||
{
|
||||
if (guildMember.Nickname.Value is not null)
|
||||
if (guildMember.Nickname.IsDefined(out var nickname))
|
||||
{
|
||||
builder.Append("- ").AppendLine(Messages.ShowInfoGuildNickname)
|
||||
.AppendLine(Markdown.InlineCode(guildMember.Nickname.Value));
|
||||
.AppendLine(Markdown.InlineCode(nickname));
|
||||
}
|
||||
|
||||
builder.Append("- ").AppendLine(Messages.ShowInfoGuildMemberSince)
|
||||
|
|
Loading…
Add table
Reference in a new issue