forked from capedayo/minya_hotomoe
20 lines
812 B
Python
20 lines
812 B
Python
from module_interface import ModuleInterface
|
|
from mipac.models import Note
|
|
|
|
class Follow(ModuleInterface):
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.name = "Follow"
|
|
self.regex_pattern = r".*팔로우\s*(부탁\s*해|해?\s*(주(\s*십\s*시\s*오|세요)|줘))"
|
|
|
|
print("[Follow] Auto follow module, Follow V1 loaded.")
|
|
|
|
async def execute_module(self, ctx: Note):
|
|
print(f"[Follow] Got Follow Related Message : {ctx.content}")
|
|
|
|
usr = await self.manager.bot.user.api.action.get(ctx.author.id)
|
|
if usr.is_following:
|
|
await ctx.api.action.reply("이미 팔로우 되어있어요..! 저를 잊으셨나요..?")
|
|
else:
|
|
await usr.api.follow.action.add()
|
|
await ctx.api.action.reply("잘 부탁드려요!")
|