Compare commits
2 Commits
a46ffb431b
...
6f2a5e03e9
Author | SHA1 | Date |
---|---|---|
ThePendulum | 6f2a5e03e9 | |
ThePendulum | 9966c79a26 |
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "schat2-clive",
|
||||
"version": "1.26.9",
|
||||
"version": "1.26.10",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "schat2-clive",
|
||||
"version": "1.26.9",
|
||||
"version": "1.26.10",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"better-sqlite3": "^8.3.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "schat2-clive",
|
||||
"version": "1.26.9",
|
||||
"version": "1.26.10",
|
||||
"description": "Game host for SChat 2-powered chat sites",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -59,12 +59,12 @@ function onCommand(args, context) {
|
|||
const hit = Math.random() > config.duck.missRatio;
|
||||
const time = new Date().getTime() - duck.getTime();
|
||||
|
||||
const distance = time < 600 * 1000 // show exact time up to ten minutes
|
||||
const distance = time < 60 * 1000 // show digits up to one minute
|
||||
? `${(time / 1000).toFixed(3)} seconds`
|
||||
: Object.entries(intervalToDuration({ start: duck, end: new Date() }))
|
||||
: `${Object.entries(intervalToDuration({ start: duck, end: new Date() }))
|
||||
.filter(([, value]) => value > 0)
|
||||
.map(([key, value]) => `${value} ${key}`)
|
||||
.join(', ');
|
||||
.join(', ')} and ${time % 1000} milliseconds`;
|
||||
|
||||
if (['bang', 'shoot'].includes(context.command)) {
|
||||
if (hit) {
|
||||
|
@ -81,6 +81,7 @@ function onCommand(args, context) {
|
|||
`That's a miss! Better luck next time, ${context.user.prefixedUsername}.`,
|
||||
`The duck outsmarted you, ${context.user.prefixedUsername}`,
|
||||
`Channeling Gareth Southgate, ${context.user.prefixedUsername}? You missed!`,
|
||||
`Oh, and that's a bad miss, ${context.user.prefixedUsername}.`,
|
||||
]);
|
||||
|
||||
shots.set(context.user.id, new Date());
|
||||
|
|
Loading…
Reference in New Issue