mirror of
https://github.com/syuilo/ai.git
synced 2025-03-25 21:12:56 +00:00
毎度取得することに
This commit is contained in:
parent
d0c8cb2562
commit
f300043f25
2 changed files with 6 additions and 4 deletions
|
@ -2,6 +2,4 @@ export type User = {
|
|||
id: string;
|
||||
name: string;
|
||||
username: string;
|
||||
isFollowing: boolean;
|
||||
isFollowed: boolean;
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue