public AutoMessage(WinterBot bot) { m_bot = bot; var options = bot.Options; m_msgOptions = options.AutoMessageOptions; m_chatOptions = options.ChatOptions; if (ShouldEnable) Enable(); if (!string.IsNullOrEmpty(m_chatOptions.SubscribeMessage)) bot.UserSubscribed += bot_UserSubscribed; if (!string.IsNullOrEmpty(m_chatOptions.FollowMessage)) bot.UserFollowed += bot_UserFollowed; bot.StreamOnline += bot_StreamOnline; bot.StreamOffline += bot_StreamOffline; }
public AutoMessage(WinterBot bot) { var options = bot.Options; m_msgOptions = options.AutoMessageOptions; m_chatOptions = options.ChatOptions; // TODO: respond to property changed on these if (m_msgOptions.Enabled) { if (m_msgOptions.MessageDelay > 0) bot.MessageReceived += bot_MessageReceived; bot.Tick += bot_Tick; } if (!string.IsNullOrEmpty(m_chatOptions.SubscribeMessage)) bot.UserSubscribed += bot_UserSubscribed; if (!string.IsNullOrEmpty(m_chatOptions.FollowMessage)) bot.UserFollowed += bot_UserFollowed; }