Attempt work-around lockPermissions() malfunction

This commit is contained in:
Lamp 2018-09-01 13:21:34 -07:00
parent 84836e26c1
commit cf33158b43
No known key found for this signature in database
GPG Key ID: 0F1F8704BEDE369E
3 changed files with 3 additions and 0 deletions

View File

@ -80,6 +80,7 @@ global.commands = {
}
if (!channel.permissionsFor(msg.member).has('MANAGE_CHANNELS')) return msg.react('🚫');
await channel.setParent(config.channels.deleted_channels);
await new Promise(resolve => setTimeout(resolve, 500));
await channel.lockPermissions();
msg.react('🆗');
}

View File

@ -16,6 +16,7 @@ module.exports = {
let channel = dClient.guilds.get(config.guildID).channels.get(existingBridge.discord_channel_id);
await dbClient.query("UPDATE bridges SET disabled = false WHERE mpp_room = $1", [room]);
await channel.setParent(config.channels.mpp_bridges);
await new Promise(resolve => setTimeout(resolve, 500));
await channel.lockPermissions();
let existingClient = clients.MPP[room];
if (existingClient) existingClient.start();

View File

@ -22,6 +22,7 @@ module.exports = {
if (client) client.stop();
var channel = dClient.channels.get(bridge.discord_channel_id)
await channel.setParent(config.channels.deleted_bridges);
await new Promise(resolve => setTimeout(resolve, 500));
await channel.lockPermissions();
msg.reply(`${bridge.mpp_room} has been unbridged.`);
}