From 6a3f7dc8a29864440a4fbba5654b35a32dd22d08 Mon Sep 17 00:00:00 2001 From: Xeltica Date: Mon, 3 Dec 2018 00:30:02 +0900 Subject: [PATCH] =?UTF-8?q?=E5=9E=8B=E3=81=8C=E3=81=8A=E3=81=8B=E3=81=97?= =?UTF-8?q?=E3=81=84=E3=81=AE=E3=81=AA=E3=81=8A=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/follow/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/follow/index.ts b/src/modules/follow/index.ts index e68ae2c..0f0329e 100644 --- a/src/modules/follow/index.ts +++ b/src/modules/follow/index.ts @@ -11,10 +11,13 @@ export default class FollowModule implements IModule { this.ai = ai; } - public onMention = async (msg: MessageLike) => { + public onMention = (msg: MessageLike) => { if (msg.text && msg.text.includes('フォロー')) { - const user: any = await this.ai.api("users/show", { + let user: any; + this.ai.api("users/show", { userId: msg.userId, + }).then(u => { + user = u; }); if (user.isFollowing) {