diff --git a/src/misskey/user.ts b/src/misskey/user.ts index 9338ef2..21c6be8 100644 --- a/src/misskey/user.ts +++ b/src/misskey/user.ts @@ -2,6 +2,4 @@ export type User = { id: string; name: string; username: string; - isFollowing: boolean; - isFollowed: boolean; }; diff --git a/src/modules/follow/index.ts b/src/modules/follow/index.ts index 0e8e265..e68ae2c 100644 --- a/src/modules/follow/index.ts +++ b/src/modules/follow/index.ts @@ -11,9 +11,13 @@ export default class FollowModule implements IModule { this.ai = ai; } - public onMention = (msg: MessageLike) => { + public onMention = async (msg: MessageLike) => { if (msg.text && msg.text.includes('フォロー')) { - if (msg.friend.doc.user.isFollowing) { + const user: any = await this.ai.api("users/show", { + userId: msg.userId, + }); + + if (user.isFollowing) { msg.reply(serifs.follow.alreadyFollowed); } else if (msg.friend.love < -5) { msg.reply(serifs.follow.ng);