add support for ETAs
This commit is contained in:
parent
fc5f7fdc82
commit
8b08bb9d22
4 changed files with 21 additions and 5 deletions
|
@ -11,6 +11,7 @@
|
||||||
"@cliqz/adblocker": "^1.23.8",
|
"@cliqz/adblocker": "^1.23.8",
|
||||||
"discord-command-parser": "^1.5.3",
|
"discord-command-parser": "^1.5.3",
|
||||||
"discord.js": "^13.8.0",
|
"discord.js": "^13.8.0",
|
||||||
|
"just-random": "^3.0.1",
|
||||||
"kleur": "^4.1.4",
|
"kleur": "^4.1.4",
|
||||||
"node-fetch": "^3.2.5",
|
"node-fetch": "^3.2.5",
|
||||||
"remove-markdown": "^0.5.0",
|
"remove-markdown": "^0.5.0",
|
||||||
|
|
15
src/index.ts
15
src/index.ts
|
@ -16,6 +16,7 @@ import {
|
||||||
type SuccessfulParsedMessage,
|
type SuccessfulParsedMessage,
|
||||||
} from 'discord-command-parser';
|
} from 'discord-command-parser';
|
||||||
|
|
||||||
|
import random from 'just-random';
|
||||||
import { readFile } from 'fs/promises';
|
import { readFile } from 'fs/promises';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
|
|
||||||
|
@ -98,6 +99,20 @@ client.once('ready', async () => {
|
||||||
return;
|
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);
|
const commanded = await parseMsg(e);
|
||||||
if (commanded) return;
|
if (commanded) return;
|
||||||
|
|
||||||
|
|
|
@ -62,11 +62,6 @@
|
||||||
"name": "build",
|
"name": "build",
|
||||||
"text": "https://polymc.org/wiki/development/build-instructions/"
|
"text": "https://polymc.org/wiki/development/build-instructions/"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "eta",
|
|
||||||
"text": "Sometime <:potat:964543999769706556>",
|
|
||||||
"aliases": ["wen", "when"]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "why",
|
"name": "why",
|
||||||
"text": "https://polymc.org/wiki/overview/faq/#why-did-our-community-choose-to-fork https://polymc.org/news/moving-on/",
|
"text": "https://polymc.org/wiki/overview/faq/#why-did-our-community-choose-to-fork https://polymc.org/news/moving-on/",
|
||||||
|
|
|
@ -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"
|
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
|
||||||
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
|
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:
|
kleur@^4.1.4:
|
||||||
version "4.1.4"
|
version "4.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.4.tgz#8c202987d7e577766d039a8cd461934c01cda04d"
|
resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.4.tgz#8c202987d7e577766d039a8cd461934c01cda04d"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue