示例#1
0
 private List <SocketTextChannel> GetRelatedChannels(SocketGuildChannel originChannel)
 {
     return(originChannel.Guild
            .TextChannels
            .Where(c => string.Compare(c.BaseName(),
                                       originChannel.BaseName(),
                                       StringComparison.OrdinalIgnoreCase) == 0 &&
                   string.Compare(c.Language().Code,
                                  originChannel.Language().Code,
                                  StringComparison.OrdinalIgnoreCase) != 0)
            .ToList());
 }