private static async Task ReorderChannels(SocketGuild guild) { var config = guild.GetGovernanceConfig(); var channels = guild.CategoryChannels.First(c => c.Id == config.Category).Channels .OrderByDescending(c => c.Id).ToList(); var normal = channels.Where(c => !c.IsSuggestionChannelByName()).Reverse(); var vote = channels.Except(normal).Where(c => c.GetSuggestionChannelType() == SuggestionType.Vote); var rfc = channels.Except(normal).Where(c => c.GetSuggestionChannelType() == SuggestionType.RFC); var draft = channels.Except(normal).Where(c => c.GetSuggestionChannelType() == SuggestionType.Draft); await guild.ReorderChannelsAsync(normal.Concat(vote).Concat(rfc).Concat(draft) .Select((c, i) => new ReorderChannelProperties(c.Id, i))); }
public virtual Task ReorderChannelsAsync(IEnumerable <ReorderChannelProperties> args, RequestOptions?options = null) { return(_socketGuild.ReorderChannelsAsync(args, options)); }
public Task ReorderChannelsAsync(IEnumerable <ReorderChannelProperties> args, RequestOptions options = null) { return(Guild.ReorderChannelsAsync(args, options)); }