mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-03-03 22:32:52 +00:00
PenaltyWebhook block thread - fix
This commit is contained in:
@@ -245,7 +245,7 @@ namespace CS2_SimpleAdmin
|
|||||||
|
|
||||||
var communityUrl = caller != null ? "<" + new SteamID(caller.SteamID).ToCommunityUrl() + ">" : "<https://steamcommunity.com/profiles/0>";
|
var communityUrl = caller != null ? "<" + new SteamID(caller.SteamID).ToCommunityUrl() + ">" : "<https://steamcommunity.com/profiles/0>";
|
||||||
var callerName = caller != null ? caller.PlayerName : "Console";
|
var callerName = caller != null ? caller.PlayerName : "Console";
|
||||||
discordWebhookClientLog.SendMessageAsync(Helper.GenerateMessageDiscord(localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", command]));
|
discordWebhookClientLog.SendMessageAsync(GenerateMessageDiscord(localizer["sa_discord_log_command", $"[{callerName}]({communityUrl})", command]));
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum PenaltyType
|
public enum PenaltyType
|
||||||
@@ -339,7 +339,10 @@ namespace CS2_SimpleAdmin
|
|||||||
embed.AddField(fieldNames[i], fieldValues[i], inlineFlags[i]);
|
embed.AddField(fieldNames[i], fieldValues[i], inlineFlags[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
new DiscordWebhookClient(webhookUrl).SendMessageAsync(embeds: [embed.Build()]);
|
Task.Run(async () =>
|
||||||
|
{
|
||||||
|
await new DiscordWebhookClient(webhookUrl).SendMessageAsync(embeds: [embed.Build()]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GenerateMessageDiscord(string message)
|
private static string GenerateMessageDiscord(string message)
|
||||||
|
|||||||
Reference in New Issue
Block a user