From 6a6a4abe2e1645c5a1ae9a3c64dfe2cfba42705d Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Tue, 5 Dec 2017 11:55:28 -0500 Subject: [PATCH] userinfo null game fix --- Commands/Status.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Commands/Status.cs b/Commands/Status.cs index 2a29260..dade048 100644 --- a/Commands/Status.cs +++ b/Commands/Status.cs @@ -11,14 +11,6 @@ namespace dotbot.Commands { public class Status : ModuleBase { - private readonly DiscordSocketClient _client; - - public Status(DiscordSocketClient client) - { - _client = client; - } - - [Command("userinfo")] [Summary("Returns info about the current user, or the user parameter, if one passed.")] [Alias("user", "whois")] @@ -39,7 +31,7 @@ namespace dotbot.Commands }; embed.AddField("ID", $"{user.Id}"); embed.AddField("Status", $"{user.Status}"); - embed.AddField("Game", $"{user.Game.ToString() ?? "not playing anything right now"}"); + embed.AddField("Game", $"{user.Game?.ToString() ?? "not playing anything right now"}"); embed.AddField("Joined At", $"{user.JoinedAt:f}"); await ReplyAsync("", false, embed);