using System; using System.Collections.Generic; using System.Linq; namespace NadekoBot.Extensions { public static class IEnumerableExtensions { public static IEnumerable Distinct(this IEnumerable data, Func getKey) => data.GroupBy(x => getKey(x)) .Select(x => x.First()); } }