This commit is contained in:
ry 2019-12-27 18:11:56 +01:00
parent 1052a0d809
commit 3793241426
4 changed files with 86 additions and 0 deletions

20
DiscordEvents/EconomyMessage.js Executable file
View file

@ -0,0 +1,20 @@
const {
eco
} = require("../utils");
const {
table
} = require("quick.db");
const Servers = new table("servers");
const Users = new table("users");
const Backend = new table("backend");
module.exports = {
name: "message",
run: async (client, Message) => {
if (Message.author.bot) return;
if (!Message.guild) return;
if (Message.author.id !== '318044130796109825') return;
await eco.CalculateFromMessage(Message)
// console.log(Message)
}
}

View file

@ -0,0 +1,22 @@
const Command = require('../../src/structures/Command');
module.exports = class Daily extends Command {
constructor() {
super({
name: 'daily',
description: 'Get your Dailies',
aliases: ['d'],
module: 'Economy',
cooldown: 5,
guildOnly: true,
developerOnly: true,
nsfw: false
});
}
async command(ctx) {
ctx.utils.eco.Dailies().then(r => {
ctx.send(`**${r.amount}** has been added to your bank.`)
}).catch(error => ctx.send(`You can get your dailies in ${error.message}`))
}
}

View file

@ -0,0 +1,22 @@
const Command = require('../../src/structures/Command');
module.exports = class Weekly extends Command {
constructor() {
super({
name: 'weekly',
description: 'Get your Dailies',
aliases: ['w'],
module: 'Economy',
cooldown: 5,
guildOnly: true,
developerOnly: true,
nsfw: false
});
}
async command(ctx) {
ctx.utils.eco.weekly().then(r => {
ctx.send(`**${r.amount}** has been added to your bank.`)
}).catch(error => ctx.send(`You can get your weeklies in ${error.message}`))
}
}

View file

@ -0,0 +1,22 @@
const Command = require('../../src/structures/Command');
module.exports = class Work extends Command {
constructor() {
super({
name: 'work',
description: 'Get your Dailies',
aliases: [],
module: 'Economy',
cooldown: 15,
guildOnly: true,
developerOnly: true,
nsfw: false
});
}
async command(ctx) {
ctx.utils.eco.quick('work', ctx.author.id).then(r => {
ctx.send(r.text)
}).catch(error => ctx.send(`Error ${error.message}`))
}
}