Update EditChannels.plugin.js

This commit is contained in:
Mirco Wittrien 2022-12-07 11:53:48 +01:00
parent fc81078d4e
commit eea70afcb2
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* @name EditChannels * @name EditChannels
* @author DevilBro * @author DevilBro
* @authorId 278543574059057154 * @authorId 278543574059057154
* @version 4.4.9 * @version 4.5.0
* @description Allows you to locally edit Channels * @description Allows you to locally edit Channels
* @invite Jx3TjNS * @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien * @donate https://www.paypal.me/MircoWittrien
@ -765,7 +765,7 @@ module.exports = (_ => {
if (!channel) return new BDFDB.DiscordObjects.Channel({}); if (!channel) return new BDFDB.DiscordObjects.Channel({});
let data = change && changedChannels[channel.id]; let data = change && changedChannels[channel.id];
if (data) { if (data) {
let nativeObject = new BDFDB.DiscordObjects.Channel(channel); let nativeObject = new (fallbackData && fallbackData.constructor || BDFDB.DiscordObjects.Channel)(channel);
nativeObject.name = data.name || nativeObject.name; nativeObject.name = data.name || nativeObject.name;
return nativeObject; return nativeObject;
} }