Messenger is ready

This commit is contained in:
2022-12-13 14:24:31 +01:00
parent bf7c23bb34
commit a54d78ccb6
5 changed files with 136 additions and 26 deletions

View File

@@ -19,10 +19,12 @@ async def cmd_message(app, msg):
except ValueError:
destination = HoloUser(msg.command[1])
void = msg.command[2]
message = " ".join(msg.command[2:])
await destination.message(msg, msg.command[2:])
if ((msg.text is not None) and (len(msg.text.split()) > 2)):
await destination.message(context=msg, text=" ".join(msg.text.split()[2:]), caption=msg.caption, photo=msg.photo, video=msg.video, file=msg.document, adm_context=True)
elif ((msg.caption is not None) and (len(msg.caption.split()) > 2)):
await destination.message(context=msg, text=msg.text, caption=" ".join(msg.caption.split()[2:]), photo=msg.photo, video=msg.video, file=msg.document, adm_context=True)
else:
await destination.message(context=msg, text=None, caption=None, photo=msg.photo, video=msg.video, file=msg.document, adm_context=True)
# try:
# new_message = await app.send_message(destination.id, message+locale("message_reply_notice", "message"))