private static async Task Version31Upgrade(int version, string filePath) { if (version < 31) { DesktopChannelSettings settings = await SerializerHelper.DeserializeFromFile <DesktopChannelSettings>(filePath); await ChannelSession.Services.Settings.Initialize(settings); settings.GiveawayStartedReminderCommand = CustomCommand.BasicChatCommand("Giveaway Started/Reminder", "A giveaway has started for $giveawayitem! Type $giveawaycommand in chat in the next $giveawaytimelimit minute(s) to enter!"); foreach (GameCommandBase command in settings.GameCommands) { if (command is GroupGameCommand) { GroupGameCommand groupCommand = (GroupGameCommand)command; groupCommand.NotEnoughPlayersCommand = CustomCommand.BasicChatCommand("Game Sub-Command", "@$username couldn't get enough users to join in..."); } else if (command is DuelGameCommand) { DuelGameCommand duelCommand = (DuelGameCommand)command; duelCommand.NotAcceptedCommand = CustomCommand.BasicChatCommand("Game Sub-Command", "@$targetusername did not respond in time..."); } } await ChannelSession.Services.Settings.Save(settings); } }
public DesktopChannelSettings(ExpandedChannelModel channel, bool isStreamer = true) : this() { this.Channel = channel; this.IsStreamer = isStreamer; this.GiveawayUserJoinedCommand = CustomCommand.BasicChatCommand("Giveaway User Joined", "You have been entered into the giveaway, stay tuned to see who wins!", isWhisper: true); this.GiveawayWinnerSelectedCommand = CustomCommand.BasicChatCommand("Giveaway Winner Selected", "Congratulations @$username, you won! Type \"!claim\" in chat in the next 60 seconds to claim your prize!", isWhisper: true); this.ModerationStrike1Command = CustomCommand.BasicChatCommand("Moderation Strike 1", "$moderationreason. You have received a moderation strike & currently have $usermoderationstrikes strike(s)", isWhisper: true); this.ModerationStrike2Command = CustomCommand.BasicChatCommand("Moderation Strike 2", "$moderationreason. You have received a moderation strike & currently have $usermoderationstrikes strike(s)", isWhisper: true); this.ModerationStrike3Command = CustomCommand.BasicChatCommand("Moderation Strike 3", "$moderationreason. You have received a moderation strike & currently have $usermoderationstrikes strike(s)", isWhisper: true); }
private static async Task Version30Upgrade(int version, string filePath) { if (version < 30) { DesktopChannelSettings settings = await SerializerHelper.DeserializeFromFile <DesktopChannelSettings>(filePath); await ChannelSession.Services.Settings.Initialize(settings); settings.GameQueueUserJoinedCommand = CustomCommand.BasicChatCommand("Game Queue Used Joined", "You are #$queueposition in the queue to play.", isWhisper: true); settings.GameQueueUserSelectedCommand = CustomCommand.BasicChatCommand("Game Queue Used Selected", "It's time to play @$username! Listen carefully for instructions on how to join..."); await ChannelSession.Services.Settings.Save(settings); } }
private static async Task Version29Upgrade(int version, string filePath) { if (version < 29) { DesktopChannelSettings settings = await SerializerHelper.DeserializeFromFile <DesktopChannelSettings>(filePath); await ChannelSession.Services.Settings.Initialize(settings); settings.SongAddedCommand = CustomCommand.BasicChatCommand("Song Request Added", "$songtitle has been added to the queue", isWhisper: true); settings.SongPlayedCommand = CustomCommand.BasicChatCommand("Song Request Played", "Now Playing: $songtitle"); await ChannelSession.Services.Settings.Save(settings); } }
private static async Task Version23Upgrade(int version, string filePath) { if (version < 23) { DesktopChannelSettings settings = await SerializerHelper.DeserializeFromFile <DesktopChannelSettings>(filePath); await ChannelSession.Services.Settings.Initialize(settings); settings.GiveawayMaximumEntries = 1; settings.GiveawayUserJoinedCommand = CustomCommand.BasicChatCommand("Giveaway User Joined", "You have been entered into the giveaway, stay tuned to see who wins!", isWhisper: true); settings.GiveawayWinnerSelectedCommand = CustomCommand.BasicChatCommand("Giveaway Winner Selected", "Congratulations @$username, you won! Type \"!claim\" in chat in the next 60 seconds to claim your prize!", isWhisper: true); settings.ModerationStrike1Command = CustomCommand.BasicChatCommand("Moderation Strike 1", "You have received a moderation strike, you currently have $usermoderationstrikes strike(s)", isWhisper: true); settings.ModerationStrike2Command = CustomCommand.BasicChatCommand("Moderation Strike 2", "You have received a moderation strike, you currently have $usermoderationstrikes strike(s)", isWhisper: true); settings.ModerationStrike3Command = CustomCommand.BasicChatCommand("Moderation Strike 3", "You have received a moderation strike, you currently have $usermoderationstrikes strike(s)", isWhisper: true); await ChannelSession.Services.Settings.Save(settings); } }
public DesktopChannelSettings(ExpandedChannelModel channel, bool isStreamer = true) : this() { this.Channel = channel; this.IsStreamer = isStreamer; this.GameQueueUserJoinedCommand = CustomCommand.BasicChatCommand("Game Queue Used Joined", "You are #$queueposition in the queue to play.", isWhisper: true); this.GameQueueUserSelectedCommand = CustomCommand.BasicChatCommand("Game Queue Used Selected", "It's time to play @$username! Listen carefully for instructions on how to join..."); this.GiveawayUserJoinedCommand = CustomCommand.BasicChatCommand("Giveaway User Joined", "You have been entered into the giveaway, stay tuned to see who wins!", isWhisper: true); this.GiveawayWinnerSelectedCommand = CustomCommand.BasicChatCommand("Giveaway Winner Selected", "Congratulations @$username, you won! Type \"!claim\" in chat in the next 60 seconds to claim your prize!", isWhisper: true); this.SongAddedCommand = CustomCommand.BasicChatCommand("Song Request Added", "$songtitle has been added to the queue", isWhisper: true); this.SongPlayedCommand = CustomCommand.BasicChatCommand("Song Request Played", "Now Playing: $songtitle"); this.ModerationStrike1Command = CustomCommand.BasicChatCommand("Moderation Strike 1", "$moderationreason. You have received a moderation strike & currently have $usermoderationstrikes strike(s)", isWhisper: true); this.ModerationStrike2Command = CustomCommand.BasicChatCommand("Moderation Strike 2", "$moderationreason. You have received a moderation strike & currently have $usermoderationstrikes strike(s)", isWhisper: true); this.ModerationStrike3Command = CustomCommand.BasicChatCommand("Moderation Strike 3", "$moderationreason. You have received a moderation strike & currently have $usermoderationstrikes strike(s)", isWhisper: true); }
public DesktopChannelSettings(ExpandedChannelModel channel, bool isStreamer = true) : this() { this.Channel = channel; this.IsStreamer = isStreamer; this.Version = DesktopChannelSettings.LatestVersion; this.DefaultStreamingSoftware = StreamingSoftwareTypeEnum.OBSStudio; this.TimerCommandsInterval = 10; this.TimerCommandsMinimumMessages = 10; this.GameQueueRequirements = new RequirementViewModel(); this.GiveawayCommand = "giveaway"; this.GiveawayTimer = 1; this.GiveawayMaximumEntries = 1; this.GiveawayRequirements = new RequirementViewModel(); this.GiveawayReminderInterval = 5; this.GiveawayRequireClaim = true; this.GiveawayUserJoinedCommand = CustomCommand.BasicChatCommand("Giveaway User Joined", "You have been entered into the giveaway, stay tuned to see who wins!", isWhisper: true); this.GiveawayWinnerSelectedCommand = CustomCommand.BasicChatCommand("Giveaway Winner Selected", "Congratulations @$username, you won! Type \"!claim\" in chat in the next 60 seconds to claim your prize!", isWhisper: true); this.MaxMessagesInChat = 100; this.ChatFontSize = 13; this.ChatUserJoinLeaveColorScheme = this.ChatEventAlertsColorScheme = this.ChatInteractiveAlertsColorScheme = ColorSchemes.DefaultColorScheme; this.OverlayWidgetRefreshTime = 5; this.ModerationFilteredWordsExcempt = MixerRoleEnum.Mod; this.ModerationFilteredWordsApplyStrikes = true; this.ModerationChatTextExcempt = MixerRoleEnum.Mod; this.ModerationChatTextApplyStrikes = true; this.ModerationBlockLinksExcempt = MixerRoleEnum.Mod; this.ModerationBlockLinksApplyStrikes = true; this.ModerationCapsBlockIsPercentage = true; this.ModerationPunctuationBlockIsPercentage = true; this.ModerationStrike1Command = CustomCommand.BasicChatCommand("Moderation Strike 1", "You have received a moderation strike, you currently have $usermoderationstrikes strike(s)", isWhisper: true); this.ModerationStrike2Command = CustomCommand.BasicChatCommand("Moderation Strike 2", "You have received a moderation strike, you currently have $usermoderationstrikes strike(s)", isWhisper: true); this.ModerationStrike3Command = CustomCommand.BasicChatCommand("Moderation Strike 3", "You have received a moderation strike, you currently have $usermoderationstrikes strike(s)", isWhisper: true); }
private void InitializeMissingData() { this.GameQueueUserJoinedCommand = this.GameQueueUserJoinedCommand ?? CustomCommand.BasicChatCommand("Game Queue Used Joined", "You are #$queueposition in the queue to play."); this.GameQueueUserSelectedCommand = this.GameQueueUserSelectedCommand ?? CustomCommand.BasicChatCommand("Game Queue Used Selected", "It's time to play @$username! Listen carefully for instructions on how to join..."); this.GiveawayStartedReminderCommand = this.GiveawayStartedReminderCommand ?? CustomCommand.BasicChatCommand("Giveaway Started/Reminder", "A giveaway has started for $giveawayitem! Type $giveawaycommand in chat in the next $giveawaytimelimit minute(s) to enter!"); this.GiveawayUserJoinedCommand = this.GiveawayUserJoinedCommand ?? CustomCommand.BasicChatCommand("Giveaway User Joined"); this.GiveawayWinnerSelectedCommand = this.GiveawayWinnerSelectedCommand ?? CustomCommand.BasicChatCommand("Giveaway Winner Selected", "Congratulations @$username, you won $giveawayitem!"); this.ModerationStrike1Command = this.ModerationStrike1Command ?? CustomCommand.BasicChatCommand("Moderation Strike 1", "$moderationreason. You have received a moderation strike & currently have $usermoderationstrikes strike(s)", isWhisper: true); this.ModerationStrike2Command = this.ModerationStrike2Command ?? CustomCommand.BasicChatCommand("Moderation Strike 2", "$moderationreason. You have received a moderation strike & currently have $usermoderationstrikes strike(s)", isWhisper: true); this.ModerationStrike3Command = this.ModerationStrike3Command ?? CustomCommand.BasicChatCommand("Moderation Strike 3", "$moderationreason. You have received a moderation strike & currently have $usermoderationstrikes strike(s)", isWhisper: true); if (this.DashboardItems.Count < 4) { this.DashboardItems = new List <DashboardItemTypeEnum>() { DashboardItemTypeEnum.None, DashboardItemTypeEnum.None, DashboardItemTypeEnum.None, DashboardItemTypeEnum.None }; } if (this.DashboardQuickCommands.Count < 5) { this.DashboardQuickCommands = new List <Guid>() { Guid.Empty, Guid.Empty, Guid.Empty, Guid.Empty, Guid.Empty }; } if (this.GetCustomCommand(this.RedemptionStoreManualRedeemNeededCommandID) == null) { CustomCommand command = CustomCommand.BasicChatCommand(RedemptionStorePurchaseModel.ManualRedemptionNeededCommandName, "@$username just purchased $productname and needs to be manually redeemed"); this.RedemptionStoreManualRedeemNeededCommandID = command.ID; this.SetCustomCommand(command); } if (this.GetCustomCommand(this.RedemptionStoreDefaultRedemptionCommandID) == null) { CustomCommand command = CustomCommand.BasicChatCommand(RedemptionStorePurchaseModel.DefaultRedemptionCommandName, "@$username just redeemed $productname"); this.RedemptionStoreDefaultRedemptionCommandID = command.ID; this.SetCustomCommand(command); } }
private static async Task Version32Upgrade(int version, string filePath) { if (version < 32) { DesktopChannelSettings settings = await SerializerHelper.DeserializeFromFile <DesktopChannelSettings>(filePath); await ChannelSession.Services.Settings.Initialize(settings); settings.SongRemovedCommand = CustomCommand.BasicChatCommand("Song Request Removed", "$songtitle has been removed from the queue", isWhisper: true); foreach (GameCommandBase command in settings.GameCommands.ToList()) { if (command is BetGameCommand) { settings.GameCommands.Remove(command); } } await ChannelSession.Services.Settings.Save(settings); } }