diff --git a/index.js b/index.js index 2745e66..04a7048 100644 --- a/index.js +++ b/index.js @@ -463,9 +463,6 @@ Example data object: console.log(`${colors.cyan("[INFO]")} Sent message to ${channel.guild.name}/${channel.name} (${channel.guild.id}/${channel.id}). ${errCount}/3`); }).catch((err) => { console.error(err); - }).then((msg) => { - if (msg.channel.type === Discord.ChannelType.GuildAnnouncement) msg.crosspost(); - }).catch(() => { console.log(`${colors.yellow("[WARN]")} Failed to send message to ${channel.guild.name}/${channel.name} (${channel.guild.id}/${channel.id})`); if (errCount < 3) { errCount++; @@ -484,7 +481,9 @@ Example data object: ] }); } - }); + }).then((msg) => { + if (msg.channel.type === Discord.ChannelType.GuildAnnouncement) msg.crosspost(); + }) } sendMessage() }); @@ -541,6 +540,7 @@ Example data object: // Message sent successfully. Note in the logs console.log(`${colors.cyan("[INFO]")} Sent message to ${user.tag} (${user.id}). ${errCount}/3`); }).catch((err) => { + console.log(err) console.log(`${colors.yellow("[WARN]")} Failed to send message to ${user.tag} (${user.id})`); if (errCount < 3) { errCount++;