private void Connect() { Close(); ws = new WebSocket(link); ws.OnMessage += (sender, e) => { messageReceived = true; MessageHandling.HandleMsg(e.Data); }; ws.Connect(); try { ws.Send(initialMsgOnlyAlerts); } catch { // } }
static void Main(string[] args) { MessageHandling.Init(new AlertDiscordHandling()); Bot.MainAsync(args).ConfigureAwait(false).GetAwaiter().GetResult(); }