From c9848443a38f61172c0975834f378a316c6bf93d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 20 Jun 2021 20:26:24 -0400 Subject: [PATCH] Fix --- Xiao.js | 4 ++-- framework/Client.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Xiao.js b/Xiao.js index e6438464..d0804093 100644 --- a/Xiao.js +++ b/Xiao.js @@ -301,7 +301,7 @@ client.on('guildCreate', async guild => { } const joinLeaveChannel = await client.fetchJoinLeaveChannel(); if (joinLeaveChannel) { - if (!guild.members.cache.has(guild.ownerID)) await guild.members.fetch(guild.ownerID); + const owner = await guild.fetchOwner(); const embed = new MessageEmbed() .setColor(0x7CFC00) .setThumbnail(guild.iconURL({ format: 'png' })) @@ -309,7 +309,7 @@ client.on('guildCreate', async guild => { .setFooter(`ID: ${guild.id}`) .setTimestamp() .addField('❯ Members', formatNumber(guild.memberCount)) - .addField('❯ Owner', guild.owner.user.tag); + .addField('❯ Owner', owner.user.tag); await joinLeaveChannel.send({ embed }); } }); diff --git a/framework/Client.js b/framework/Client.js index 68affe05..1cab8aba 100644 --- a/framework/Client.js +++ b/framework/Client.js @@ -101,8 +101,7 @@ module.exports = class CommandClient extends Client { } const throttleAmount = command.throttles.get(msg.author.id); if (throttleAmount && throttleAmount.usages >= command.throttling.usages) { - const timeout = command._timeouts.get(msg.author.id); - const timeLeft = Math.round((timeout.timeFinish - Date.now()) / 1000); + const timeLeft = Math.round((throttleAmount.timeFinish - Date.now()) / 1000); await msg.reply(`Please wait ${timeLeft} seconds before using the \`${command.name}\` command again.`); return; }