1
0
Fork 0
mirror of https://github.com/syuilo/ai.git synced 2025-03-25 21:12:56 +00:00

毎度取得することに

This commit is contained in:
Xeltica 2018-12-03 00:26:40 +09:00
parent d0c8cb2562
commit f300043f25
2 changed files with 6 additions and 4 deletions
src
misskey
modules/follow

View file

@ -2,6 +2,4 @@ export type User = {
id: string;
name: string;
username: string;
isFollowing: boolean;
isFollowed: boolean;
};

View file

@ -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);