Ejemplo n.º 1
0
 public override Task OnChangeSettings(IProcessorSettings settings)
 {
     _settings = settings as GameSynopsisCommandSettings;
     _aliases  = _settings.Aliases;
     _asReply  = _settings.AsReply;
     return(Task.CompletedTask);
 }
Ejemplo n.º 2
0
        public override async Task <IProcessorSettings> LoadSettings(Guid processorId, string broadcasterId, CommandOptions options)
        {
            _settings = new GameSynopsisCommandSettings();
            _settings.LoadFromOptions(options);

            await base.CreateSettings(processorId, broadcasterId, _settings);

            var context = await _twitchAPIClient.GetChannelInfoAsync(broadcasterId);

            _gameInfo = await _twitchCategoryProvider.FetchChannelInfo(context.GameId, context.BroadcasterLanguage);

            return(_settings);
        }
Ejemplo n.º 3
0
        public override Task <IProcessorSettings> CreateSettings(Guid processorId, string broadcasterId, IProcessorSettings settings = null)
        {
            if (settings as GameSynopsisCommandSettings == null)
            {
                _settings = new GameSynopsisCommandSettings();
            }
            else
            {
                _settings = settings as GameSynopsisCommandSettings;
            }

            return(base.CreateSettings(processorId, broadcasterId, _settings));
        }