using System.Collections.Generic; using System.Linq; namespace Maki { internal sealed class ChannelManager : BaseManager { internal ChannelManager() { } public DiscordChannel Id(ulong id) { lock (Collection) return Collection.Where(x => x.Id == id).FirstOrDefault(); } public bool Exists(ulong id) { lock (Collection) return Collection.Where(x => x.Id == id).Count() > 0; } public IEnumerable Server(DiscordServer server) { lock (Collection) return Collection.Where(x => x.Server == server).OrderBy(x => x.Position); } } }