public MusicService(DiscordSocketClient client, IGoogleApiService google, NadekoStrings strings, ILocalization localization, DbService db, SoundCloudApiService sc, IBotCredentials creds, NadekoBot bot) { _client = client; _google = google; _strings = strings; _localization = localization; _db = db; _sc = sc; _creds = creds; _log = LogManager.GetCurrentClassLogger(); _musicSettings = bot.AllGuildConfigs.ToDictionary(x => x.GuildId, x => x.MusicSettings) .ToConcurrent(); _client.LeftGuild += _client_LeftGuild; try { Directory.Delete(MusicDataPath, true); } catch { } _defaultVolumes = new ConcurrentDictionary <ulong, float>( bot.AllGuildConfigs .ToDictionary(x => x.GuildId, x => x.DefaultMusicVolume)); AutoDcServers = new ConcurrentHashSet <ulong>(bot.AllGuildConfigs.Where(x => x.AutoDcFromVc).Select(x => x.GuildId)); Directory.CreateDirectory(MusicDataPath); }
public MusicService(DiscordSocketClient client, IGoogleApiService google, NadekoStrings strings, ILocalization localization, DbService db, SoundCloudApiService sc, IEnumerable <GuildConfig> gcs) { _client = client; _google = google; _strings = strings; _localization = localization; _db = db; _sc = sc; _log = LogManager.GetCurrentClassLogger(); try { Directory.Delete(MusicDataPath, true); } catch { } _defaultVolumes = new ConcurrentDictionary <ulong, float>(gcs.ToDictionary(x => x.GuildId, x => x.DefaultMusicVolume)); Directory.CreateDirectory(MusicDataPath); //_t = new Timer(_ => _log.Info(MusicPlayers.Count(x => x.Value.Current.Current != null)), null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5)); }
public SoundcloudResolveStrategy(SoundCloudApiService sc) { _sc = sc; }
public SongResolverFactory(SoundCloudApiService sc) { _sc = sc; }
public SoundcloudResolver(SoundCloudApiService sc, ITrackCacher trackCacher, IHttpClientFactory httpFactory) { _sc = sc; _trackCacher = trackCacher; _httpFactory = httpFactory; }