fix TypeError: Cannot read property 'id' of undefined
at TextChannel.setParent (/app/node_modules/discord.js/src/structures/GuildChannel.js:393:44) at Object.exec (/app/src/mppbridger/commands/bridge.js:18:20) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)
This commit is contained in:
parent
a01a2933df
commit
4d99f27b61
|
@ -15,7 +15,7 @@ module.exports = {
|
|||
} else /* rebridge */ {
|
||||
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();
|
||||
await channel.setParent(config.channels.mpp_bridges);
|
||||
await channel.lockPermissions();
|
||||
createMPPbridge(room, existingBridge.mpp_room, existingBridge.site, existingBridge.webhook_id, existingBridge.webhook_token);
|
||||
await msg.reply(`${site} room ${room} has been re-bridged.`);
|
||||
|
@ -35,4 +35,4 @@ module.exports = {
|
|||
]);
|
||||
msg.reply(`${site} room ${room} is now bridged to ${channel}.`);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue