private void Enqueue(string youtubeLink, string title, ulong guildId, ulong userId) { QueueEntry entry = null; if (Cache.TryGetCachedFile(youtubeLink, out MusicFile musicFile)) { entry = QueueEntry.FromMusicFile(musicFile, userId); } else { entry = new QueueEntry(youtubeLink, userId, title, filePath: Path.Combine(Config.FileCachePath, title.RemovePathForbiddenChars()), alreadyDownloaded: false, onDownloadFinished: x => { Cache.AddToCache(youtubeLink, entry, Config.CachePersistTime); }); } Queues.GetOrCreateService(guildId).Add(entry); }