jsonrpc: add API to check if the message is sent by a bot

Co-Authored-By: Asiel Díaz Benítez <asieldbenitez@gmail.com>
This commit is contained in:
link2xt
2023-02-12 18:30:13 +00:00
parent 1c875209f7
commit 6c8368fa23
5 changed files with 55 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ async def main():
async def process_messages():
for message in await account.get_fresh_messages_in_arrival_order():
snapshot = await message.get_snapshot()
if not snapshot.is_info:
if not snapshot.is_bot and not snapshot.is_info:
await snapshot.chat.send_text(snapshot.text)
await snapshot.message.mark_seen()