1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00

throw GUILD_ROLE_DELETE event

This commit is contained in:
afeuerstein 2021-05-22 19:35:53 +02:00
parent 192ae9c37a
commit 8375383e5c

View File

@ -8,7 +8,8 @@ import {
Snowflake,
MemberModel,
GuildRoleCreateEvent,
GuildRoleUpdateEvent
GuildRoleUpdateEvent,
GuildRoleDeleteEvent
} from "@fosscord/server-util";
import { HTTPError } from "lambert-server";
import { emitEvent } from "../../../util/Event";
@ -85,6 +86,15 @@ router.delete("/:role_id", async (req: Request, res: Response) => {
guild_id: guild_id
}).exec();
await emitEvent({
event: "GUILD_ROLE_DELETE",
guild_id,
data: {
guild_id,
role_id
}
} as GuildRoleDeleteEvent);
res.sendStatus(204);
});