This commit is contained in:
ITOH
2021-04-24 19:39:49 +02:00
parent d7015df65f
commit 5793351fef
6 changed files with 16 additions and 19 deletions
+4 -3
View File
@@ -1,5 +1,6 @@
import { rest } from "../../rest/rest.ts";
import { CreateGuildRole } from "../../types/mod.ts";
import { structures } from "../../structures/mod.ts";
import { CreateGuildRole, Role } from "../../types/mod.ts";
import { endpoints } from "../../util/constants.ts";
import {
calculateBits,
@@ -14,7 +15,7 @@ export async function editRole(
) {
await requireBotGuildPermissions(guildId, ["MANAGE_ROLES"]);
const result = await rest.runMethod(
const result = await rest.runMethod<Role>(
"patch",
endpoints.GUILD_ROLE(guildId, id),
{
@@ -25,5 +26,5 @@ export async function editRole(
},
);
return result;
return await structures.createDiscordenoRole(result);
}