2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-29 13:38:55 +00:00

add delete command

This commit is contained in:
Nick80835 2020-05-01 10:27:07 -04:00
parent 16d3e99468
commit c1963bcc00

View File

@ -25,6 +25,13 @@ async def reload_modules(event):
pass pass
@ldr.add(pattern="del")
async def delete_message(event):
message_to_delete = await event.get_reply_message()
if message_to_delete.from_id == (await event.client.get_me()).id:
await message_to_delete.delete()
@ldr.add(pattern="alive", sudo=True) @ldr.add(pattern="alive", sudo=True)
async def alive(event): async def alive(event):
alive_format = "`μBot is running under {0}.\n\n" \ alive_format = "`μBot is running under {0}.\n\n" \