mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-17 19:58:18 +00:00
fix: more missing typings and remove swap roles
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import { rest } from "../../rest/rest.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
import { requireBotGuildPermissions } from "../../util/permissions.ts";
|
||||
|
||||
/** Modify the positions of a set of role objects for the guild. Requires the MANAGE_ROLES permission. */
|
||||
export async function swapRoles(guildId: string, rolePositions: PositionSwap) {
|
||||
await requireBotGuildPermissions(guildId, ["MANAGE_ROLES"]);
|
||||
|
||||
const result = await rest.runMethod(
|
||||
"patch",
|
||||
endpoints.GUILD_ROLES(guildId),
|
||||
rolePositions,
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user