From e3f9491dcc04f645e8491854355f612681c303b4 Mon Sep 17 00:00:00 2001 From: lanxu Date: Tue, 12 Mar 2019 21:29:01 +0200 Subject: [PATCH] Updated Mastodon actually have correct finnish verb. Allowed dice throws to have text after the command. --- plugins/dice.js | 4 ++-- plugins/mastodon.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/dice.js b/plugins/dice.js index 6aad30c..ddb21fb 100644 --- a/plugins/dice.js +++ b/plugins/dice.js @@ -11,7 +11,7 @@ class Dice extends BasePlugin { test(input) { var res = null; - if (res = input.match(/^\.heit(a|ä) ([0-9]+)d([0-9]+)$/i)) { + if (res = input.match(/^\.heit(a|ä) ([0-9]+)d([0-9]+)( ([ \w])*)*$/i)) { return true; } if (res = input.match(/^\.heit(a|ä) voltti homo$/i)) { @@ -54,7 +54,7 @@ class Dice extends BasePlugin { result(input) { // Different cases let res = null - if (res = input.match(/^\.heit(a|ä) ([0-9]+)d([0-9]+)$/i)) { + if (res = input.match(/^\.heit(a|ä) ([0-9]+)d([0-9]+)( ([ \w])*)*$/i)) { var th = this.getDiceString(res[2], res[3]); return 'Heitettiin: '+th; } diff --git a/plugins/mastodon.js b/plugins/mastodon.js index 98a0d2d..056ca86 100644 --- a/plugins/mastodon.js +++ b/plugins/mastodon.js @@ -71,9 +71,9 @@ class Mastodon extends BasePlugin { if (host !== null && tootId !== null) { that.getToot(host, tootId).then(function(toot) { - resultResolve('Töötti: ' + toot); + resultResolve('Tuuttaus: ' + toot); }, function(error) { - resultReject('Töötti: Jokin virhe tapahtui'); + resultReject('Tuuttaus: Jokin virhe tapahtui'); }); } });