Simp-O-Matic

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

commit b43ac6219ceb4b6ddc84db68facb7e083d733476
parent 2460e85ab8ad794af6e024ce26d084c90dc7e0d2
Author: danyisill <danyisill@users.noreply.github.com>
Date:   Fri, 22 May 2020 02:08:52 +0300

Use nickname instead of username

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

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