Update deleted bridges cat id

also made it update db first so it doesnt restart if something went wrong while unbridging
This commit is contained in:
Lamp 2018-05-31 13:07:17 -07:00 committed by GitHub
parent dcfaf75c57
commit 7d3ecf716f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -422,11 +422,11 @@ commands.unbridge = {
msg.reply(`You do not own that bridge.`);
return;
}
await dbClient.query("UPDATE bridges SET disabled = 'true' WHERE mpp_room = $1", [bridge.mpp_room]);
clients.MPP[bridge.mpp_room].stop();
var channel = dClient.channels.get(bridge.discord_channel_id)
await channel.setParent('425054341725159424');
await channel.setParent('451838300068511745');
await channel.lockPermissions();
await dbClient.query("UPDATE bridges SET disabled = 'true' WHERE mpp_room = $1", [bridge.mpp_room]);
msg.reply(`${bridge.mpp_room} has been unbridged.`);
}
}