Spaces:
Paused
Paused
Download Powers/utils/cmd_senders.py from Dragdev/telegrambot: direct link, hf CLI and curl.
- Browser
- Download file 727 Bytes
-
https://huggingface.co/spaces/Dragdev/telegrambot/resolve/492d7fcd90594de1ce93896bb2a9b2f9e1927150/Powers/utils/cmd_senders.py
- Command line
-
hf download hf://spaces/Dragdev/telegrambot@492d7fcd90594de1ce93896bb2a9b2f9e1927150/Powers/utils/cmd_senders.py
-
curl -L -o cmd_senders.py https://huggingface.co/spaces/Dragdev/telegrambot/resolve/492d7fcd90594de1ce93896bb2a9b2f9e1927150/Powers/utils/cmd_senders.py
727 Bytes
| from Powers.bot_class import Gojo | |
| from Powers.utils.msg_types import Types | |
| async def send_cmd(client: Gojo, msgtype: int): | |
| GET_FORMAT = { | |
| Types.TEXT.value: client.send_message, | |
| Types.DOCUMENT.value: client.send_document, | |
| Types.PHOTO.value: client.send_photo, | |
| Types.VIDEO.value: client.send_video, | |
| Types.STICKER.value: client.send_sticker, | |
| Types.AUDIO.value: client.send_audio, | |
| Types.VOICE.value: client.send_voice, | |
| Types.VIDEO_NOTE.value: client.send_video_note, | |
| Types.ANIMATION.value: client.send_animation, | |
| Types.ANIMATED_STICKER.value: client.send_sticker, | |
| Types.CONTACT: client.send_contact, | |
| } | |
| return GET_FORMAT[msgtype] | |