Attempt work-around lockPermissions() malfunction
This commit is contained in:
parent
84836e26c1
commit
cf33158b43
|
@ -80,6 +80,7 @@ global.commands = {
|
||||||
}
|
}
|
||||||
if (!channel.permissionsFor(msg.member).has('MANAGE_CHANNELS')) return msg.react('🚫');
|
if (!channel.permissionsFor(msg.member).has('MANAGE_CHANNELS')) return msg.react('🚫');
|
||||||
await channel.setParent(config.channels.deleted_channels);
|
await channel.setParent(config.channels.deleted_channels);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 500));
|
||||||
await channel.lockPermissions();
|
await channel.lockPermissions();
|
||||||
msg.react('🆗');
|
msg.react('🆗');
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ module.exports = {
|
||||||
let channel = dClient.guilds.get(config.guildID).channels.get(existingBridge.discord_channel_id);
|
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 dbClient.query("UPDATE bridges SET disabled = false WHERE mpp_room = $1", [room]);
|
||||||
await channel.setParent(config.channels.mpp_bridges);
|
await channel.setParent(config.channels.mpp_bridges);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 500));
|
||||||
await channel.lockPermissions();
|
await channel.lockPermissions();
|
||||||
let existingClient = clients.MPP[room];
|
let existingClient = clients.MPP[room];
|
||||||
if (existingClient) existingClient.start();
|
if (existingClient) existingClient.start();
|
||||||
|
|
|
@ -22,6 +22,7 @@ module.exports = {
|
||||||
if (client) client.stop();
|
if (client) client.stop();
|
||||||
var channel = dClient.channels.get(bridge.discord_channel_id)
|
var channel = dClient.channels.get(bridge.discord_channel_id)
|
||||||
await channel.setParent(config.channels.deleted_bridges);
|
await channel.setParent(config.channels.deleted_bridges);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 500));
|
||||||
await channel.lockPermissions();
|
await channel.lockPermissions();
|
||||||
msg.reply(`${bridge.mpp_room} has been unbridged.`);
|
msg.reply(`${bridge.mpp_room} has been unbridged.`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue