private static async void Timer_Elapsed(object sender, ElapsedEventArgs e, IRole role)
{
Console.WriteLine("Таймер сработал.");
try
{
string strFormatted = "Abeme";
await Integration.DiscordIntegration.SendMessage(chanelid, "=== ADMINS ONLINE ===", true).ConfigureAwait(true);
foreach (var p in Main.Players)
{
if (p.Value.AdminLVL < 1) continue;
if (p.Value.AdminLVL >= 1)
{
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} Admin LVL: {p.Value.AdminLVL}**";
}
if (p.Value.AdminLVL >= 5)
{
strFormatted = $"**```diff\n-ID: [{p.Key.Value}] Ник_Нейм: {p.Key.Name} Admin LVL: {p.Value.AdminLVL}\n```**";
}
await Integration.DiscordIntegration.SendMessage(chanelid, strFormatted, true).ConfigureAwait(true);
}
if (strFormatted == "Abeme" || strFormatted == null)
{
strFormatted = $"{MentionUtils.MentionRole(876466478558355564)} {MentionUtils.MentionRole(876466478537388072)} Никого нет в сети";
await Integration.DiscordIntegration.SendMessage(chanelid, strFormatted, true).ConfigureAwait(true);
}
await Integration.DiscordIntegration.SendMessage(chanelid, "=== ADMINS ONLINE ===", true).ConfigureAwait(true);
}
catch { }
}
Есть код выше почему то бот тегает вот так