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:
parent
192ae9c37a
commit
8375383e5c
@ -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);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user