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:
Lamp 2018-07-25 11:54:29 -07:00 committed by GitHub
parent a01a2933df
commit 4d99f27b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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}.`);
}
};
};