Simp-O-Matic

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

commit 0067b97092ca1b1acd42e0779c9be33467f6ed9f
parent aa1c551387d533933c1aa7f2e58152e7f2ff49b0
Author: Demonstrandum <moi@knutsen.co>
Date:   Fri, 22 May 2020 00:49:44 +0100

Maybe this will fix Danny's doodoo.

Diffstat:
Mlib/action.ts | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/action.ts b/lib/action.ts @@ -157,8 +157,9 @@ export default class Action { } static get(action: ActionType, message: Message): MessageEmbed { - var [author, to] = [message.author, message.mentions.users.first()].map(message.guild.member).map(u => u.nickname); - + const [author, to] = [message.author, message.mentions.users.first()] + .map(m => message.guild.member(m)) + .map(u => u.nickname); const reaction: Actions = ACTIONS[action]; const images = reaction.images; const image = images[Math.floor(Math.random() * images.length)];