public static bool TryGetCategory(this SocketGuild g, string s, out SocketCategoryChannel cg) { cg = null; if (!g.HasCategory(s)) { return(false); } cg = g.CategoryChannels.Where(x => x.Name.ToLower() == s.ToLower()).First(); return(true); }