userinfo null game fix

This commit is contained in:
Ben Harris 2017-12-05 11:55:28 -05:00
parent f8e9de2cd4
commit 6a6a4abe2e
1 changed files with 1 additions and 9 deletions

View File

@ -11,14 +11,6 @@ namespace dotbot.Commands
{ {
public class Status : ModuleBase<SocketCommandContext> public class Status : ModuleBase<SocketCommandContext>
{ {
private readonly DiscordSocketClient _client;
public Status(DiscordSocketClient client)
{
_client = client;
}
[Command("userinfo")] [Command("userinfo")]
[Summary("Returns info about the current user, or the user parameter, if one passed.")] [Summary("Returns info about the current user, or the user parameter, if one passed.")]
[Alias("user", "whois")] [Alias("user", "whois")]
@ -39,7 +31,7 @@ namespace dotbot.Commands
}; };
embed.AddField("ID", $"{user.Id}"); embed.AddField("ID", $"{user.Id}");
embed.AddField("Status", $"{user.Status}"); 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}"); embed.AddField("Joined At", $"{user.JoinedAt:f}");
await ReplyAsync("", false, embed); await ReplyAsync("", false, embed);