diff options
author | RaindropsSys <contact@minteck.org> | 2023-05-12 16:43:00 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-05-12 16:43:00 +0200 |
commit | 32bed03d78e8bc20ae2e81d9379bf63f4a58caba (patch) | |
tree | 3bcf08f8ff48af67e7cd7a4e1c776c27a8f4c159 /commands | |
parent | 2f160cbdf67f40c71ddafe62eb502fc443ab9e90 (diff) | |
download | butterscotch-32bed03d78e8bc20ae2e81d9379bf63f4a58caba.tar.gz butterscotch-32bed03d78e8bc20ae2e81d9379bf63f4a58caba.tar.bz2 butterscotch-32bed03d78e8bc20ae2e81d9379bf63f4a58caba.zip |
Updated 19 files and added 2 files (automated)
Diffstat (limited to 'commands')
-rw-r--r-- | commands/help.js | 4 | ||||
-rw-r--r-- | commands/usage.js | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/commands/help.js b/commands/help.js index d27bd03..bf2971c 100644 --- a/commands/help.js +++ b/commands/help.js @@ -34,6 +34,10 @@ module.exports = (parameter, wrapper) => { txt += "* **Description:** " + help['description'] + "\n"; } + if (parameter === "ask" || parameter === "math") { + txt += "* Limited to 400 commands a month\n"; + } + wrapper.send(txt); } else { wrapper.send("😢 Sorry, no help is available for this command, try again later."); diff --git a/commands/usage.js b/commands/usage.js new file mode 100644 index 0000000..d4289ab --- /dev/null +++ b/commands/usage.js @@ -0,0 +1,8 @@ +module.exports = (parameter, wrapper) => { + let usedCredits = { + month:ratelimits["month"][wrapper.sender][new Date().toISOString().split("-").splice(0, 2).join("-")] + } + + wrapper.send("🛑 More expensive commands have a monthly credit system to prevent abuse and to make sure everyone gets a fair share at trying out the bot. These credits are reset every month on the 1st.\n\n\n" + + "* **Knowledge credits:** " + usedCredits["month"] + "/" + maxCredits["month"] + " (" + Math.round(((maxCredits["month"] - usedCredits["month"]) / maxCredits["month"]) * 100) + "% used)"); +}
\ No newline at end of file |