// Handles subscription event public static void handleSubscription(TwitchLib.TwitchChatClient.OnSubscriberArgs e) { Common.RecentSub = e.Subscriber; if (e.Subscriber.Months > 0) { WebCalls.addSoundbyteCredits(e.Subscriber.Name, resubSoundbytes); WebCalls.addDoubloons(e.Subscriber.Name, resubDoubloons); Common.ChatClient.SendMessage(string.Format("Welcome back returning crewmember {0}, of {1} months!!! burkeAhoy burkeFlag burkeAhoy burkeFlag", e.Subscriber.Name, e.Subscriber.Months), Common.DryRun); Common.ChatClient.SendMessage(string.Format("Enjoy your resub booty of {0} doubloons and {1} sound byte credits, {2}!", resubDoubloons, resubSoundbytes, e.Subscriber.Name), Common.DryRun); } else { WebCalls.addSoundbyteCredits(e.Subscriber.Name, newSubSoundbytes); WebCalls.addDoubloons(e.Subscriber.Name, newSubDoubloons); Common.ChatClient.SendMessage(string.Format("Welcome aboard matey! Please welcome the latest crewmember to the BurkeBlack crew, {0}! burkeAhoy burkeFlag burkeAhoy burkeFlag", e.Subscriber.Name), Common.DryRun); Common.ChatClient.SendMessage(string.Format("Enjoy your subscription booty of 100 doubloons and 5 sound byte credits, {0}!", e.Subscriber.Name), Common.DryRun); } }
// Fires when a subscription from channel connected to occurs (noteably not a hosted streamer's sub) public static void chatOnSubscribe(object sender, TwitchLib.TwitchChatClient.OnSubscriberArgs e) { Common.other(string.Format("SUBSCRIBER {0}, months: ", e.Subscriber.Months)); Subscriptions.handleSubscription(e); }