Fix one thing, another problem pops up
Co-authored-by: TheArcaneBrony <myrainbowdash949@gmail.com>
This commit is contained in:
co-authored by
TheArcaneBrony
parent
12a151eb2d
commit
013a4b8bc8
@@ -1,4 +1,4 @@
|
||||
import { Channel, Message, ChannelDeleteEvent, ChannelPermissionOverwriteType, ChannelType, ChannelUpdateEvent, emitEvent, Recipient } from "@fosscord/util";
|
||||
import { Channel, Message, Invite, ReadState, ChannelDeleteEvent, ChannelPermissionOverwriteType, ChannelType, ChannelUpdateEvent, emitEvent, Recipient } from "@fosscord/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { handleFile, route } from "@fosscord/api";
|
||||
|
||||
@@ -32,6 +32,9 @@ router.delete("/", route({ permission: "MANAGE_CHANNELS" }), async (req: Request
|
||||
} else {
|
||||
await Promise.all([
|
||||
Message.delete({ channel_id: channel_id }),
|
||||
Invite.delete({ channel_id: channel_id }),
|
||||
Recipient.delete({ channel_id: channel_id }),
|
||||
ReadState.delete({ channel_id: channel_id }),
|
||||
Channel.delete({ id: channel_id }),
|
||||
emitEvent({ event: "CHANNEL_DELETE", data: channel, channel_id } as ChannelDeleteEvent)
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user