Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

commit 1ac1fd7d69c863d5dfad890c3a27b667c275bbfb
parent b1cd7920c4c2013f163c758c1c9cb7f4f447bbf3
Author: Demonstrandum <moi@knutsen.co>
Date:   Fri, 22 May 2020 14:44:26 +0100

Merge branch 'master' of github.com:Demonstrandum/Simp-O-Matic

Diffstat:
Mlib/action.ts | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/action.ts b/lib/action.ts @@ -162,7 +162,7 @@ export default class Action { .map(u => u.nickname); const reaction: Actions = ACTIONS[action]; const images = reaction.images; - const image = images[Math.floor(Math.random() * images.length)]; + const image = images[(Number(message.cleanContent.split(' ')[1]) || (Math.floor(Math.random() * images.length) + 1)) - 1]; const embed = new MessageEmbed() .setColor('#ba3d8a')