public static async Task Initialize(ServicesManagerBase serviceHandler)
        {
            ChannelSession.Services = serviceHandler;

            try
            {
                Type mixItUpSecretsType = Type.GetType("MixItUp.Base.MixItUpSecrets");
                if (mixItUpSecretsType != null)
                {
                    ChannelSession.Services.SetSecrets((SecretsService)Activator.CreateInstance(mixItUpSecretsType));
                }
            }
            catch (Exception ex) { Logger.Log(ex); }

            try
            {
                Type voicemodServiceType = Type.GetType("MixItUp.Base.Services.External.VoicemodService");
                if (voicemodServiceType != null)
                {
                    ChannelSession.Services.Voicemod = (IVoicemodService)Activator.CreateInstance(voicemodServiceType);
                }
            }
            catch (Exception ex) { Logger.Log(ex); }

            ChannelSession.AppSettings = await ApplicationSettingsV2Model.Load();
        }
Example #2
0
        public static async Task Initialize(ServicesManagerBase serviceHandler)
        {
            ChannelSession.Services = serviceHandler;

            try
            {
                Type mixItUpSecretsType = Type.GetType("MixItUp.Base.MixItUpSecrets");
                if (mixItUpSecretsType != null)
                {
                    ChannelSession.Services.SetSecrets((SecretsService)Activator.CreateInstance(mixItUpSecretsType));
                }
            }
            catch (Exception ex) { Logger.Log(ex); }

            ChannelSession.PreMadeChatCommands = new List <PreMadeChatCommand>();

            ChannelSession.AppSettings = await ApplicationSettingsV2Model.Load();
        }