mirror of https://github.com/coddrago/Heroku
Add modules' creators propriety gesture to HikkaDL (Automatic reaction when downloading via button)
parent
bd6f35878d
commit
737dfd8343
|
@ -18,6 +18,7 @@ from .._types import LoadError
|
|||
import json
|
||||
import re
|
||||
import websockets
|
||||
from telethon.tl.functions.messages import SendReactionRequest
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -72,6 +73,17 @@ class HikkaDLMod(loader.Module):
|
|||
await wss.send("🚫 Origin is not allowed")
|
||||
continue
|
||||
|
||||
try:
|
||||
await self._client(
|
||||
SendReactionRequest(
|
||||
peer=ans["channel"],
|
||||
msg_id=ans["message_id"],
|
||||
reaction="❤️",
|
||||
)
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
m = await self._client.send_message("me", f".dlmod {link}")
|
||||
await self.allmodules.commands["dlmod"](m)
|
||||
load = (await self._client.get_messages(m.peer_id, ids=[m.id]))[0]
|
||||
|
|
Loading…
Reference in New Issue