Files
discordeno/helpers/roles/removeRole.ts
2022-02-11 09:49:53 +00:00

12 lines
356 B
TypeScript

import type { Bot } from "../../bot.ts";
/** Remove a role from the member */
export async function removeRole(bot: Bot, guildId: bigint, memberId: bigint, roleId: bigint, reason?: string) {
await bot.rest.runMethod<undefined>(
bot.rest,
"delete",
bot.constants.endpoints.GUILD_MEMBER_ROLE(guildId, memberId, roleId),
{ reason },
);
}