parent
36d5931a07
commit
122a049e88
8
index.js
8
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`);
|
console.log(`${colors.cyan("[INFO]")} Sent message to ${channel.guild.name}/${channel.name} (${channel.guild.id}/${channel.id}). ${errCount}/3`);
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.error(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})`);
|
console.log(`${colors.yellow("[WARN]")} Failed to send message to ${channel.guild.name}/${channel.name} (${channel.guild.id}/${channel.id})`);
|
||||||
if (errCount < 3) {
|
if (errCount < 3) {
|
||||||
errCount++;
|
errCount++;
|
||||||
|
|
@ -484,7 +481,9 @@ Example data object:
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}).then((msg) => {
|
||||||
|
if (msg.channel.type === Discord.ChannelType.GuildAnnouncement) msg.crosspost();
|
||||||
|
})
|
||||||
}
|
}
|
||||||
sendMessage()
|
sendMessage()
|
||||||
});
|
});
|
||||||
|
|
@ -541,6 +540,7 @@ Example data object:
|
||||||
// Message sent successfully. Note in the logs
|
// Message sent successfully. Note in the logs
|
||||||
console.log(`${colors.cyan("[INFO]")} Sent message to ${user.tag} (${user.id}). ${errCount}/3`);
|
console.log(`${colors.cyan("[INFO]")} Sent message to ${user.tag} (${user.id}). ${errCount}/3`);
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
console.log(`${colors.yellow("[WARN]")} Failed to send message to ${user.tag} (${user.id})`);
|
console.log(`${colors.yellow("[WARN]")} Failed to send message to ${user.tag} (${user.id})`);
|
||||||
if (errCount < 3) {
|
if (errCount < 3) {
|
||||||
errCount++;
|
errCount++;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue