Skip to content

Commit 1a508c9

Browse files
committed
try and fix ArgumentException in UserInfo
1 parent 5e98def commit 1a508c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Bot/Systems/Commands/Text/Modules/Utility/InfoCommands.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ public Task<ActionResult> UserInfoAsync(
2929
{
3030
user ??= Context.User;
3131

32+
var activity = getRelevantActivity();
33+
3234
return Ok(Context.CreateEmbedBuilder()
3335
.WithTitle(user.ToString())
3436
.AddField("ID", user.Id, true)
35-
.AddField("Activity", getRelevantActivity(), true)
37+
.AddField("Activity", activity.IsNullOrEmpty() ? "Nothing" : activity, true)
3638
.AddField("Status", user.Status, true)
3739
.AddField("Is Bot", user.IsBot ? "Yes" : "No", true)
3840
.AddField("Role Hierarchy", user.Hierarchy, true)

0 commit comments

Comments
 (0)