Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Allow command to be run via discord bridge
  • Loading branch information
fank committed Nov 21, 2018
commit 3eceb6ff6e3a59ce66d03a2dc3fdd3ec4419e228
5 changes: 4 additions & 1 deletion Essentials/Commands/AdminModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ public void Statistics()
sb.AppendLine("Timing:");
Stats.Timing.WriteTo(sb);

ModCommunication.SendMessageTo(new DialogMessage("Statistics", null, sb.ToString()) , Context.Player.SteamUserId);
if (Context?.Player?.SteamUserId > 0)
ModCommunication.SendMessageTo(new DialogMessage("Statistics", null, sb.ToString()) , Context.Player.SteamUserId);
else
Context.Respond(sb.ToString());
}

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