Files
Arthonor-Neo/commands/legacy/nuts/nutsCooldown.js
T

88 lines
1.6 KiB
JavaScript

const {
EmbedBuilder
} = require("discord.js");
const {
getCooldown,
getUnixTime
} = require(
"../../../utils/nutEconomy"
);
module.exports = {
name:
"nutsCooldown",
description:
"shows nut cooldown",
aliases: [
"ncd"
],
async execute(
message,
args
) {
const cooldown =
await getCooldown(
message.author.id,
"nut"
);
const now =
getUnixTime();
let content =
"Du kannst wieder nussen! :)";
let thumbnail =
"https://cdn-icons-png.flaticon.com/512/7451/7451659.png";
let title =
"Go Nuts!";
if (
cooldown >
now
) {
content =
`<t:${cooldown}:R> kannst du wieder nussen! ;)`;
thumbnail =
"https://cdn.discordapp.com/attachments/1152723542836772914/1152987472788193361/No-nuts-PhotoRoom.png-PhotoRoom.png";
title =
"To Nut or Not to Nut...";
}
const embed =
new EmbedBuilder()
.setThumbnail(
thumbnail
)
.setTitle(
title
)
.setDescription(
content
);
await message.reply({
embeds: [
embed
]
});
}
};