filebrute
filebrute
DIAdiscord.js - Imagine an app
Created by filebrute on 9/6/2024 in #djs-questions
Delete ping and not ping.
sortefd
6 replies
DIAdiscord.js - Imagine an app
Created by filebrute on 9/6/2024 in #djs-questions
Delete ping and not ping.
if (!isAdmin && userMentionHistory[userId]) {
const lastMentionTime = userMentionHistory[userId].lastMention;
if (now - lastMentionTime < oneDay) {
const timeLeft = oneDay - (now - lastMentionTime);
const hoursLeft = Math.floor(timeLeft / (1000 * 60 * 60));
const minutesLeft = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));

const response = `You can use everyone or here again in ${hoursLeft} hours and ${minutesLeft} minutes.`;

await message.delete();
await message.channel.send(response);
return;
}
}
if (!isAdmin && userMentionHistory[userId]) {
const lastMentionTime = userMentionHistory[userId].lastMention;
if (now - lastMentionTime < oneDay) {
const timeLeft = oneDay - (now - lastMentionTime);
const hoursLeft = Math.floor(timeLeft / (1000 * 60 * 60));
const minutesLeft = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));

const response = `You can use everyone or here again in ${hoursLeft} hours and ${minutesLeft} minutes.`;

await message.delete();
await message.channel.send(response);
return;
}
}
6 replies
DIAdiscord.js - Imagine an app
Created by filebrute on 9/6/2024 in #djs-questions
Delete ping and not ping.
node -v version? v20.12.2
6 replies
DIAdiscord.js - Imagine an app
Created by filebrute on 9/6/2024 in #djs-questions
Delete ping and not ping.
6 replies