static void Main(string[] args) { TwitchChatBot bot = new TwitchChatBot(); TelegramBetBot betBot = new TelegramBetBot(); bot.Connect(); betBot.Messages(); Console.ReadLine(); bot.Disconnect(); }
static async void Bot_OnMessage(object sender, MessageEventArgs e) { if (e.Message.Text == null) { Console.WriteLine($"Received a text message in chat {e.Message.Chat.Id}."); await botClient.SendTextMessageAsync( chatId : e.Message.Chat, text : "You said:\n" + e.Message.Text ); } if (e.Message.Text.Contains("!bet")) { Console.WriteLine($"Received a text message in chat {e.Message.Chat.Id}, and the message is {e.Message.Text}."); TwitchChatBot.Client_OnMessageSent(e.Message.Text); } }