diff --git a/commands/IAT/checkjar.js b/commands/IAT/checkjar.js index 22e14086..ca912386 100644 --- a/commands/IAT/checkjar.js +++ b/commands/IAT/checkjar.js @@ -55,7 +55,6 @@ class Checkjar extends BaseCommand { jarTransactions.length = 10; jarTransactions.forEach(t => { - // TODO const time = moment.unix(t.time); embed.data.fields.push([ diff --git a/helpers/birthdays.js b/helpers/birthdays.js index 61eba481..08e5e3c0 100644 --- a/helpers/birthdays.js +++ b/helpers/birthdays.js @@ -9,8 +9,8 @@ module.exports.init = async client => { client.guilds.cache.forEach(async guild => { const guildData = await client.findOrCreateGuild(guild.id); - if (guildData.plugins.birthdays) { - const channel = await guild.channels.fetch(guildData.plugins.birthdays), + if (guildData.plugins.birthdays && client.channels.cache.get(guildData.plugins.birthdays)) { + const channel = client.channels.cache.get(guildData.plugins.birthdays), date = new Date(), currentDay = date.getDate(), currentMonth = date.getMonth() + 1, @@ -67,8 +67,8 @@ module.exports.run = async client => { client.guilds.cache.forEach(async guild => { const guildData = await client.findOrCreateGuild(guild.id); - if (guildData.plugins.birthdays) { - const channel = await guild.channels.fetch(guildData.plugins.birthdays), + if (guildData.plugins.birthdays && client.channels.cache.get(guildData.plugins.birthdays)) { + const channel = client.channels.cache.get(guildData.plugins.birthdays), date = new Date(), currentDay = date.getDate(), currentMonth = date.getMonth() + 1,