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 json
|
||||||
import re
|
import re
|
||||||
import websockets
|
import websockets
|
||||||
|
from telethon.tl.functions.messages import SendReactionRequest
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -72,6 +73,17 @@ class HikkaDLMod(loader.Module):
|
||||||
await wss.send("🚫 Origin is not allowed")
|
await wss.send("🚫 Origin is not allowed")
|
||||||
continue
|
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}")
|
m = await self._client.send_message("me", f".dlmod {link}")
|
||||||
await self.allmodules.commands["dlmod"](m)
|
await self.allmodules.commands["dlmod"](m)
|
||||||
load = (await self._client.get_messages(m.peer_id, ids=[m.id]))[0]
|
load = (await self._client.get_messages(m.peer_id, ids=[m.id]))[0]
|
||||||
|
|
Loading…
Reference in New Issue