add delete plugin

kate
udf 2019-05-07 15:16:47 +02:00
parent 8290974235
commit 30c4f29b9c
Signed by: kate
GPG Key ID: F17AECB58C3A3096
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
"""
Reply to a message with .d <n> to delete <n> messages from that point
(negative values of <n> go backwards in history)
"""
import asyncio
from stdplugins.kbass_core import self_reply_selector
@self_reply_selector(borg, r'\.d')
async def on_save(event, targets, num_offset):
await borg.delete_messages(
await event.get_input_chat(),
targets
)