Skip to content

Commit

Permalink
Daily Claim
Browse files Browse the repository at this point in the history
  • Loading branch information
Nurutomo committed Jan 13, 2021
1 parent 3e62566 commit 76375c5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions plugins/daily.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
let handler = async (m, { conn }) => {
if (new Date - global.DATABASE._data.users[m.sender].lastclaim > 86400000) {
conn.reply(m.chat, '+500 XP', m)
global.DATABASE._data.users[m.sender].exp += 500
global.DATABASE._data.users[m.sender].lastclaim = new Date * 1
} else conn.reply(m.chat, 'Anda sudah mengklaim klaim harian hari ini', m)
}
handler.help = ['daily', 'claim'])
handler.tags = ['xp']
handler.command = /^(daily|claim)$/i
handler.owner = false
handler.mods = false
handler.premium = false
handler.group = false
handler.private = false

handler.admin = false
handler.botAdmin = false

handler.fail = null
handler.exp = 0

module.exports = handler

0 comments on commit 76375c5

Please sign in to comment.