型がおかしいのなおした

This commit is contained in:
Xeltica 2018-12-03 00:30:02 +09:00
parent f300043f25
commit 6a3f7dc8a2

View file

@ -11,10 +11,13 @@ export default class FollowModule implements IModule {
this.ai = ai; this.ai = ai;
} }
public onMention = async (msg: MessageLike) => { public onMention = (msg: MessageLike) => {
if (msg.text && msg.text.includes('フォロー')) { 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, userId: msg.userId,
}).then(u => {
user = u;
}); });
if (user.isFollowing) { if (user.isFollowing) {