| 1234567891011121314151617181920212223242526272829303132333435363738 |
- const free = 5000
- const prem = 20000
- let handler = async (m, {conn, isPrems }) => {
- let time = global.db.data.users[m.sender].lastclaim + 86400000
- if (new Date - global.db.data.users[m.sender].lastclaim < 86400000) throw `โ ๏ธ ๐๐ ๐ง๐๐๐ก๐๐ข๐๐จ๐ฉ๐ ๐ฉ๐ช ๐ง๐๐๐๐ก๐ค ๐\n๐๐ช๐๐ก๐ซ๐ ๐๐ฃ *${msToTime(time - new Date())}* ๐๐๐ง๐ ๐ซ๐ค๐ก๐ซ๐๐ง ๐ ๐ง๐๐๐ก๐๐ข๐๐ง*`
- const limit = Math.floor(Math.random() * 30)
- const money = Math.floor(Math.random() * 800)
- global.db.data.users[m.sender].limit += limit;
- global.db.data.users[m.sender].money += money
- global.db.data.users[m.sender].exp += isPrems ? prem : free
- m.reply(`๐ *๐๐๐ฉ๐๐๐ฃ๐ ๐ช๐ฃ ๐ง๐๐๐๐ก๐ค!!*
- ๐ธ *๐๐๐ ๐๐๐๐๐๐๐๐:*
- *๐ Diamante:* ${limit}
- *๐ช KantuCoins:* ${money}
- *๐ Xp:* ${isPrems ? prem : free}`)
- global.db.data.users[m.sender].lastclaim = new Date * 1
- }
- handler.help = ['daily']
- handler.tags = ['econ']
- handler.command = ['daily', 'claim']
- handler.register = true
- export default handler
- function msToTime(duration) {
- var milliseconds = parseInt((duration % 1000) / 100),
- seconds = Math.floor((duration / 1000) % 60),
- minutes = Math.floor((duration / (1000 * 60)) % 60),
- hours = Math.floor((duration / (1000 * 60 * 60)) % 24)
- hours = (hours < 10) ? "0" + hours : hours
- minutes = (minutes < 10) ? "0" + minutes : minutes
- seconds = (seconds < 10) ? "0" + seconds : seconds
- return hours + " Horas " + minutes + " Minutos"
- }
|