Ejemplo n.º 1
0
 void OnMicroPresent(MicroPresent present)
 {
     if (!string.IsNullOrEmpty(present.Message))
     {
         Dispatcher.Invoke(() => AddStatus($"{present.Username} has donated {present.Amount} {present.Currency} -> \"{present.Message}\"", Colors.DarkBlue));
     }
     else
     {
         Dispatcher.Invoke(() => AddStatus($"{present.Username} has donated {present.Amount} {present.Currency}.", Colors.DarkBlue));
     }
 }
Ejemplo n.º 2
0
        void OnPresent(MicroPresent present)
        {
            if (string.IsNullOrEmpty(present.Message) || present.Amount < Threshold)
            {
                return;
            }

            string text = present.Message.Replace("cheer50", "").Replace("cheer100", "").Replace("cheer250", "").Replace("cheer500", "").Trim();

            if (!string.IsNullOrEmpty(text))
            {
                context.GetModule <TTSModule>().Speak(text);
            }
        }
Ejemplo n.º 3
0
        protected override bool FilterMessage(ChatMessage message)
        {
            if (message.User == "jtv")
            {
                ParseJTVMessage(message);
                return(true);
            }

            if (message.Bits > 0)
            {
                MicroPresent?.Invoke(this, new MicroPresent
                {
                    Currency = "Bits",
                    Amount   = message.Bits,
                    Service  = Service,
                    Username = message.User,
                    Message  = message.Message
                });
            }
            return(base.FilterMessage(message));
        }
Ejemplo n.º 4
0
 void OnMicroPresent(MicroPresent present)
 {
     // user doesn't necessarily exist here (could be his first appearance with an immediate donation)
     AddDonation(context.GetModule <UserModule>().GetUser(present.Service, present.Username).ID, present.Amount);
 }