2021-06-12 12:53:51 +02:00
|
|
|
const { Client, Message, MessageEmbed } = require("discord.js");
|
|
|
|
module.exports = {
|
|
|
|
name: "daily",
|
|
|
|
description: "Earns daily money",
|
|
|
|
category: "Economy",
|
|
|
|
timeout: 1000 * 60 * 60 * 24,
|
|
|
|
run: async (client, message, args) => {
|
|
|
|
var money;
|
|
|
|
const user = await client.data.getUser(message.author.id);
|
|
|
|
if (user) {
|
|
|
|
if (user.Premium == true) {
|
|
|
|
money = 20000;
|
|
|
|
let pre_embed = new MessageEmbed()
|
|
|
|
.setAuthor(
|
|
|
|
message.author.tag,
|
|
|
|
message.author.displayAvatarURL({ dyanmic: true })
|
|
|
|
)
|
|
|
|
.setDescription(
|
|
|
|
`**Here is your daily ${money}${client.currency}!\nThanks for supporting Cath!**`
|
|
|
|
)
|
|
|
|
.setURL(client.web)
|
|
|
|
.setColor(client.color)
|
2021-06-24 09:53:19 +02:00
|
|
|
.setFooter(`Made by ${client.author}`)
|
2021-06-12 12:53:51 +02:00
|
|
|
.setTimestamp();
|
2021-07-13 05:17:39 +02:00
|
|
|
await client.add(message.author.id, money, message);
|
2021-06-12 12:53:51 +02:00
|
|
|
return message.inlineReply(pre_embed);
|
|
|
|
} else {
|
|
|
|
money = 10000;
|
|
|
|
let norm_embed = new MessageEmbed()
|
|
|
|
.setAuthor(
|
|
|
|
message.author.tag,
|
|
|
|
message.author.displayAvatarURL({ dyanmic: true })
|
|
|
|
)
|
|
|
|
.setDescription(
|
|
|
|
`Here is your daily ${money}${client.currency}!\nBe [premium](https://discord.gg/SbQHChmGcp) user, you can get more coins everyday!`
|
|
|
|
)
|
|
|
|
.setURL(client.web)
|
|
|
|
.setColor(client.color)
|
2021-06-24 09:53:19 +02:00
|
|
|
.setFooter(`Made by ${client.author}`)
|
2021-06-12 12:53:51 +02:00
|
|
|
.setTimestamp();
|
2021-07-13 05:17:39 +02:00
|
|
|
await client.add(message.author.id, money, message);
|
2021-06-12 12:53:51 +02:00
|
|
|
return message.inlineReply(norm_embed);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|