This commit is contained in:
parent
40c48cb61a
commit
36d5931a07
4
index.js
4
index.js
|
|
@ -469,7 +469,7 @@ Example data object:
|
||||||
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++;
|
||||||
setTimeout(sendMessage, 5000); // Retry after 5 seconds
|
setTimeout(sendMessage, 5000 * errCount); // Retry after 5 seconds
|
||||||
} else {
|
} else {
|
||||||
const logChannel = discord.guilds.cache.get(config.discord.mainGuild).channels.cache.get(config.discord.logChannel);
|
const logChannel = discord.guilds.cache.get(config.discord.mainGuild).channels.cache.get(config.discord.logChannel);
|
||||||
logChannel.send({
|
logChannel.send({
|
||||||
|
|
@ -544,7 +544,7 @@ Example data object:
|
||||||
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++;
|
||||||
setTimeout(sendMessage, 5000); // Retry after 5 seconds
|
setTimeout(sendMessage, 5000 * errCount); // Retry after 5 seconds
|
||||||
} else {
|
} else {
|
||||||
const logChannel = discord.guilds.cache.get(config.discord.mainGuild).channels.cache.get(config.discord.logChannel);
|
const logChannel = discord.guilds.cache.get(config.discord.mainGuild).channels.cache.get(config.discord.logChannel);
|
||||||
logChannel.send({
|
logChannel.send({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue