Skip to content

Commit 86f3079

Browse files
fankrexxar-tc
authored andcommitted
Allow command to be run via discord bridge (#62)
1 parent 382e111 commit 86f3079

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎Essentials/Commands/AdminModule.cs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ public void Statistics()
2828
sb.AppendLine("Timing:");
2929
Stats.Timing.WriteTo(sb);
3030

31-
ModCommunication.SendMessageTo(new DialogMessage("Statistics", null, sb.ToString()) , Context.Player.SteamUserId);
31+
if (Context?.Player?.SteamUserId > 0)
32+
ModCommunication.SendMessageTo(new DialogMessage("Statistics", null, sb.ToString()) , Context.Player.SteamUserId);
33+
else
34+
Context.Respond(sb.ToString());
3235
}
3336

3437
[Command("playercount", "Gets or sets the max number of players on the server")]

0 commit comments

Comments
 (0)