diff --git a/package.json b/package.json index f01fb67..0c970b2 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "@cliqz/adblocker": "^1.23.8", "discord-command-parser": "^1.5.3", "discord.js": "^13.8.0", + "just-random": "^3.0.1", "kleur": "^4.1.4", "node-fetch": "^3.2.5", "remove-markdown": "^0.5.0", diff --git a/src/index.ts b/src/index.ts index 43da4e7..fa4166d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,6 +16,7 @@ import { type SuccessfulParsedMessage, } from 'discord-command-parser'; +import random from 'just-random'; import { readFile } from 'fs/promises'; import { join } from 'path'; @@ -98,6 +99,20 @@ client.once('ready', async () => { return; } + if (e.cleanContent.includes('eta')) { + await e.reply( + `${random([ + 'Sometime', + 'Some day', + 'Not far', + 'The future', + 'Never', + 'Perhaps tomorrow?', + 'There are no ETAs', + ])} <:pofat:964546613194420294>` + ); + } + const commanded = await parseMsg(e); if (commanded) return; diff --git a/src/tags.json b/src/tags.json index 93bdc34..0c60ba1 100644 --- a/src/tags.json +++ b/src/tags.json @@ -62,11 +62,6 @@ "name": "build", "text": "https://polymc.org/wiki/development/build-instructions/" }, - { - "name": "eta", - "text": "Sometime <:potat:964543999769706556>", - "aliases": ["wen", "when"] - }, { "name": "why", "text": "https://polymc.org/wiki/overview/faq/#why-did-our-community-choose-to-fork https://polymc.org/news/moving-on/", diff --git a/yarn.lock b/yarn.lock index 4f4e037..169194b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1100,6 +1100,11 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= +just-random@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/just-random/-/just-random-3.0.1.tgz#7bee212808686683a755d93842f1af86a02b3026" + integrity sha512-JOp2xkWZcPNEsDRJOWupw/qJhqUakcNi1gXCqRyix00jUJP37aJUaHuyjeQLC1Vg6ts+cNWWGifdHmP88A6uvA== + kleur@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.4.tgz#8c202987d7e577766d039a8cd461934c01cda04d"