-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Фиксы и рефактор + конфиг для пинга в дс или нет
- Loading branch information
1 parent
24d091c
commit 0a6768c
Showing
3 changed files
with
64 additions
and
16 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
Content.Server/ADT/Administration/Commands/SendUpdateServerCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Content.Shared.Administration; | ||
using Robust.Shared.Console; | ||
using Content.Server.Administration; | ||
using Content.Server.ServerUpdates; | ||
|
||
namespace Content.Server.ADT.Administration.Commands; | ||
|
||
|
||
[AdminCommand(AdminFlags.Permissions)] | ||
public sealed class SendUpdateServerCommand : LocalizedCommands | ||
{ | ||
[Dependency] private readonly ServerUpdateManager _serverManager = default!; | ||
public override string Command => "send_updateserver_devtest"; | ||
|
||
public override async void Execute(IConsoleShell shell, string argStr, string[] args) | ||
{ | ||
var player = shell.Player; | ||
if (player == null) | ||
{ | ||
shell.WriteError(LocalizationManager.GetString("shell-target-player-does-not-exist")); | ||
return; | ||
} | ||
|
||
_serverManager.SendDiscordWebHookUpdateMessage(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters