示例#1
0
文件: OnLeave.cs 项目: xiluisx/Ghooks
 public void OnEvent(ShPlayer player)
 {
     Core.Instance.joinWebhook.Send(string.Format(Core.Instance.Settings.Server.PlayerLeaveFormat, player.username), player.username,
                                    embeds: Core.Instance.Settings.Server.PlayerLeaveUseEmbed ? EmbedCrafter.CreateAllEmbeds(Core.Instance.Settings.Server.PlayerLeaveEmbed, player) : null);
 }
示例#2
0
 public void OnEvent(ShPlayer player, string message)
 {
     if (message.StartsWith("/"))
     {
         Core.Instance.commandWebhook.Send(string.Format(Core.Instance.Settings.Chat.CommandsLogFormat, message, player.username), player.username,
                                           embeds: Core.Instance.Settings.Chat.CommandsUseEmbed ? EmbedCrafter.CreateAllEmbeds(Core.Instance.Settings.Chat.CommandsEmbed, player, message) : null);
         return;
     }
     Core.Instance.globalWebhook.Send(string.Format(Core.Instance.Settings.Chat.GlobalFormat, message, player.username), player.username,
                                      embeds: Core.Instance.Settings.Chat.GlobalUseEmbed ? EmbedCrafter.CreateAllEmbeds(Core.Instance.Settings.Chat.GlobalEmbed, player, message) : null);
 }