forked from cadence/out-of-your-element
forcing space sync will unbridge deleted channels
This commit is contained in:
parent
0237d45c60
commit
0acf59bf48
2 changed files with 12 additions and 4 deletions
|
@ -145,7 +145,11 @@ async function syncSpaceFully(guildID) {
|
|||
for (const roomID of childRooms) {
|
||||
const channelID = db.prepare("SELECT channel_id FROM channel_room WHERE room_id = ?").pluck().get(roomID)
|
||||
if (!channelID) continue
|
||||
await createRoom.syncRoom(channelID)
|
||||
if (discord.channels.has(channelID)) {
|
||||
await createRoom.syncRoom(channelID)
|
||||
} else {
|
||||
await createRoom.unbridgeDeletedChannel(channelID, guildID)
|
||||
}
|
||||
}
|
||||
|
||||
return spaceID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue