mirror of
https://github.com/Nick80835/microbot
synced 2025-08-31 06:26:04 +00:00
sorta support topics
This commit is contained in:
@@ -49,3 +49,12 @@ class ExtendedEvent(NewMessage.Event):
|
||||
|
||||
if size_attr and ((size_attr[0].w == 512 and size_attr[0].h <= 512) or (size_attr[0].w <= 512 and size_attr[0].h == 512)):
|
||||
return reply.sticker
|
||||
|
||||
async def respond(self, *args, **kwargs):
|
||||
if self.reply_to and self.reply_to.forum_topic and not kwargs.get("reply_to", None):
|
||||
if self.reply_to.reply_to_top_id:
|
||||
return await self.message.respond(*args, **kwargs|{"reply_to": self.reply_to.reply_to_top_id})
|
||||
elif self.reply_to.reply_to_msg_id:
|
||||
return await self.message.respond(*args, **kwargs|{"reply_to": self.reply_to.reply_to_msg_id})
|
||||
|
||||
return await self.message.respond(*args, **kwargs)
|
||||
|
@@ -16,8 +16,8 @@ async def supernekoatsume(event):
|
||||
nekotype = event.object.pattern
|
||||
as_file = bool(event.other_args[0])
|
||||
|
||||
if nekotype in REPLY_TYPES:
|
||||
reply_to = await event.get_reply_message() or event
|
||||
if nekotype in REPLY_TYPES and event.is_reply:
|
||||
reply_to = await event.get_reply_message()
|
||||
else:
|
||||
reply_to = event
|
||||
|
||||
|
Reference in New Issue
Block a user