Cleaned up and fixed several reorder issues.
This commit is contained in:
@@ -75,23 +75,16 @@ namespace Discord.Rest
|
||||
|
||||
return await client.ApiClient.ModifyGuildEmbedAsync(guild.Id, apiArgs, options).ConfigureAwait(false);
|
||||
}
|
||||
public static async Task ModifyChannelsAsync(IGuild guild, BaseDiscordClient client,
|
||||
IEnumerable<BulkGuildChannelProperties> args, RequestOptions options)
|
||||
public static async Task ReorderChannelsAsync(IGuild guild, BaseDiscordClient client,
|
||||
IEnumerable<ReorderChannelProperties> args, RequestOptions options)
|
||||
{
|
||||
var apiArgs = args.Select(x => new API.Rest.ModifyGuildChannelsParams(x.Id, x.Position));
|
||||
await client.ApiClient.ModifyGuildChannelsAsync(guild.Id, apiArgs, options).ConfigureAwait(false);
|
||||
}
|
||||
public static async Task<IReadOnlyCollection<RoleModel>> ModifyRolesAsync(IGuild guild, BaseDiscordClient client,
|
||||
IEnumerable<BulkRoleProperties> args, RequestOptions options)
|
||||
public static async Task<IReadOnlyCollection<RoleModel>> ReorderRolesAsync(IGuild guild, BaseDiscordClient client,
|
||||
IEnumerable<ReorderRoleProperties> args, RequestOptions options)
|
||||
{
|
||||
var apiArgs = args.Select(x => new API.Rest.ModifyGuildRolesParams(x.Id)
|
||||
{
|
||||
Color = x.Color.IsSpecified ? x.Color.Value.RawValue : Optional.Create<uint>(),
|
||||
Hoist = x.Hoist,
|
||||
Name = x.Name,
|
||||
Permissions = x.Permissions.IsSpecified ? x.Permissions.Value.RawValue : Optional.Create<ulong>(),
|
||||
Position = x.Position
|
||||
});
|
||||
var apiArgs = args.Select(x => new API.Rest.ModifyGuildRolesParams(x.Id, x.Position));
|
||||
return await client.ApiClient.ModifyGuildRolesAsync(guild.Id, apiArgs, options).ConfigureAwait(false);
|
||||
}
|
||||
public static async Task LeaveAsync(IGuild guild, BaseDiscordClient client,
|
||||
|
||||
Reference in New Issue
Block a user