Download scripts/cmds/balance.js from sweet2004/bot: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/spaces/sweet2004/bot/resolve/main/scripts/cmds/balance.js
- Command line
-
hf download hf://spaces/sweet2004/bot/scripts/cmds/balance.js
-
curl -L -o balance.js https://huggingface.co/spaces/sweet2004/bot/resolve/main/scripts/cmds/balance.js
1.3 kB
| module.exports = { | |
| config: { | |
| name: "balance", | |
| aliases: ["bal"], | |
| version: "1.1", | |
| author: "NTKhang", | |
| countDown: 5, | |
| role: 0, | |
| shortDescription: { | |
| vi: "xem số tiền của bạn", | |
| en: "view your money" | |
| }, | |
| longDescription: { | |
| vi: "xem số tiền hiện có của bạn hoặc người được tag", | |
| en: "view your money or the money of the tagged person" | |
| }, | |
| category: "economy", | |
| guide: { | |
| vi: " {pn}: xem số tiền của bạn" | |
| + "\n {pn} <@tag>: xem số tiền của người được tag", | |
| en: " {pn}: view your money" | |
| + "\n {pn} <@tag>: view the money of the tagged person" | |
| } | |
| }, | |
| langs: { | |
| vi: { | |
| money: "Bạn đang có %1$", | |
| moneyOf: "%1 đang có %2$" | |
| }, | |
| en: { | |
| money: "You have %1$", | |
| moneyOf: "%1 has %2$" | |
| } | |
| }, | |
| onStart: async function ({ message, usersData, event, getLang }) { | |
| if (Object.keys(event.mentions).length > 0) { | |
| const uids = Object.keys(event.mentions); | |
| let msg = ""; | |
| for (const uid of uids) { | |
| const userMoney = await usersData.get(uid, "money"); | |
| msg += getLang("moneyOf", event.mentions[uid].replace("@", ""), userMoney) + '\n'; | |
| } | |
| return message.reply(msg); | |
| } | |
| const userData = await usersData.get(event.senderID); | |
| message.reply(getLang("money", userData.money)); | |
| } | |
| }; |