mirror of
https://github.com/Nick80835/microbot
synced 2025-09-03 16:05:49 +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)):
|
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
|
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
|
nekotype = event.object.pattern
|
||||||
as_file = bool(event.other_args[0])
|
as_file = bool(event.other_args[0])
|
||||||
|
|
||||||
if nekotype in REPLY_TYPES:
|
if nekotype in REPLY_TYPES and event.is_reply:
|
||||||
reply_to = await event.get_reply_message() or event
|
reply_to = await event.get_reply_message()
|
||||||
else:
|
else:
|
||||||
reply_to = event
|
reply_to = event
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user