есть метод:
public static async void CMD_AllAdmins(Player client)
{
try
{
if (!Group.CanUseCmd(client, "admins")) return;
client.SendChatMessage("=== ADMINS ONLINE ===");
await Integration.DiscordIntegration.SendMessage(, "=== ADMINS ONLINE ===", true).ConfigureAwait(true);
foreach (var p in Main.Players)
{
if (p.Value.AdminLVL < 1) continue;
client.SendChatMessage($"[{p.Key.Value}] {p.Key.Name} - {p.Value.AdminLVL}");
string strFormatted = null;
if (p.Value.AdminLVL == 1)
{
strFormatted = $"Id: [{p.Key.Value}] Ник_Нейм: {p.Key.Name} AdminLvl: {p.Value.AdminLVL}";
}
if (p.Value.AdminLVL == 2)
{
strFormatted = $"Id: [{p.Key.Value}] Ник_Нейм: {p.Key.Name} AdminLvl: {p.Value.AdminLVL}";
}
if (p.Value.AdminLVL >= 3)
{
strFormatted = $"**Id: [{p.Key.Value}] Ник_Нейм: {p.Key.Name} AdminLvl: {p.Value.AdminLVL}**";
}
await Integration.DiscordIntegration.SendMessage(, strFormatted, true).ConfigureAwait(true);
}
client.SendChatMessage("=== ADMINS ONLINE ===");
await Integration.DiscordIntegration.SendMessage(, "=== ADMINS ONLINE ===", true).ConfigureAwait(true);
}
catch (Exception e)
{
Log.Write("EXCEPTION AT \"CMD_AllAdmins\":" + e.ToString(), nLog.Type.Error);
}
}
как его вызывать каждые 5 минут?