Пример #1
0
 private static void HandleIncomingPacket(ushort comId, byte[] msg, ulong id, bool relible)
 {
     try
     {
         if (!msg.IsNullOrEmpty())
         {
             var message = Encoding.ASCII.GetString(msg);
             if (message.Equals("clear"))
             {
                 return;
             }
             DiscordService.SendDiscordWebHook(message);
         }
     }
     catch (Exception error)
     {
         Log.Error(error, "Network error");
     }
 }
 private void TestWebHookButton_OnClick(object sender, RoutedEventArgs e)
 {
     Log.Info("Test Webhook Sent");
     DiscordService.SendDiscordWebHook("Successful WebHook Test");
 }
Пример #3
0
 public void WebHookTest()
 {
     this.Context.Respond("test message sent");
     DiscordService.SendDiscordWebHook("Successful WebHook Test");
 }