Fix !chown

TypeError: fn.bind is not a function
    at Map.find (/app/node_modules/discord.js/src/util/Collection.js:171:49)
    at Object.exec (/app/src/mppbridger.js:465:46)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
This commit is contained in:
Lamp 2018-07-12 14:24:59 -07:00 committed by GitHub
parent d9f1ab5e09
commit 13ebc32b20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -462,7 +462,7 @@ commands.chown = {
MANAGE_WEBHOOKS: true,
MANAGE_MESSAGES: true
});
let po = msg.channel.permissionOverwrites.find('id', msg.author.id);
let po = msg.channel.permissionOverwrites.find(x => x.id == msg.author.id);
if (po) po.delete();
await dbClient.query('UPDATE bridges SET owner_discord_user_id = $1 WHERE discord_channel_id = $2;', [selectedUser.id, msg.channel.id]);
msg.channel.send(`Ownership of ${msg.channel} has been transferred to ${selectedUser}`);