forked from uniborg/uniborg
reply with braille art on deletion
This commit is contained in:
parent
73dd73eb24
commit
3ef1a7fd11
|
@ -1,8 +1,39 @@
|
||||||
|
import asyncio
|
||||||
from telethon import events
|
from telethon import events
|
||||||
from telethon.tl import types
|
from telethon.tl import types
|
||||||
|
|
||||||
@borg.on(events.NewMessage(pattern=r"^h$", outgoing=False))
|
EPIC_MEME = (
|
||||||
|
"""
|
||||||
|
⢠⠤⢠⢄⠠⡤⢀⠤⠀⠀⠀⠀⢀⣔⢔⢔⢕⢔⢕⢔⢐⢀⠀⠀⠀⠀⠀⠀
|
||||||
|
⠸⠥⠸⠁⠠⠧⠘⠤⠀⠀⠀⣐⢗⢕⢗⢕⢕⢕⢕⢔⢑⢐⢀⠀⠀⠀⠀⠀
|
||||||
|
⢰⠑⢱⢸⠭⢰⠑⢱⢸⠭⢐⣟⣗⣕⢗⣗⢑⢕⢑⢕⢑⠐⢑⢐⢐⢐⢀⠀
|
||||||
|
⢨⢄⢨⢨⢩⢌⢠⠬⢨⠉⢐⣟⢗⢕⢑⣿⣷⣕⣑⠕⢑⢐⣗⠐⢐⢐⢐⢐
|
||||||
|
⠸⠜⠘⠜⠸⠜⠸⠥⠨⢀⢐⢑⢕⢕⢑⢛⣿⣿⣷⣔⣴⡟⠓⠀⢀⢔⢑⠑
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠀⢐⢗⢑⠐⠐⢷⣷⣷⣿⣿⣿⣿⣿⢕⢐⢔⢑⢔⠁⠀
|
||||||
|
⠀⠀⠀⠀⠀⠀⠀⠰⢗⢕⢗⢕⢕⢔⠙⢟⢿⣕⣷⣟⣗⣔⠀⠀⠀⠀⠀⠀
|
||||||
|
⠀⠀⠀⠀⠀⠘⢶⠄⠀⠐⠁⠐⠁⠀⠀⢀⣐⣖⢷⣟⣷⣿⣷⣔⣀⠀⠀⠀
|
||||||
|
⠀⠀⠀⠀⠀⠀⢘⣗⣴⣴⠀⠀⠀⢀⣴⣿⣿⢟⢗⢛⣿⣟⣟⣟⣿⣟⣗⠀
|
||||||
|
⠀⠀⠀⠀⠀⠀⢐⣿⣿⣿⡇⠀⢐⣿⣿⣟⣗⢐⢐⣔⣿⣗⣷⣟⣿⣟⣿⣗
|
||||||
|
⠀⠀⠀⠀⠀⠀⢰⣿⣿⣟⣁⢐⢿⣟⣿⣿⣗⠐⢐⣟⣿⣟⣟⣟⣷⣟⣿⣗
|
||||||
|
⠀⠀⠀⠀⠀⠀⢙⣟⣿⣿⣷⣗⣖⣿⣿⣟⢑⠐⢐⣟⣗⣟⣗⣗⢗⠟⢓⣑
|
||||||
|
⠀⠀⠀⠀⠀⠀⠐⠑⠛⠛⠛⠑⠓⠙⠛⠓⠁⠐⠐⠛⠓⠛⠓⠓⠑⠒⠓⠛
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
@borg.on(events.NewMessage(pattern=r"^h$"))
|
||||||
async def on_h(event):
|
async def on_h(event):
|
||||||
await borg.send_message(await event.get_input_chat(), '',
|
message = await event.reply(
|
||||||
file=types.InputDocument(421851232546587302, -6059663575626880183),
|
file=types.InputDocument(421851232546587302, -6059663575626880183))
|
||||||
reply_to=event.message.id)
|
|
||||||
|
async def del_filter(del_event):
|
||||||
|
if del_event.chat_id and del_event.chat_id != event.chat_id:
|
||||||
|
return False
|
||||||
|
return del_event.deleted_id == message.id
|
||||||
|
fut = borg.await_event(events.MessageDeleted, del_filter)
|
||||||
|
|
||||||
|
try:
|
||||||
|
await asyncio.wait_for(fut, timeout=5)
|
||||||
|
await event.reply(EPIC_MEME)
|
||||||
|
except asyncio.TimeoutError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue