All Projects → tm-a-t → TGPy

tm-a-t / TGPy

Licence: MIT License
Run Python code right in your Telegram messages

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to TGPy

WilliamButcherBot
Telegram Group Manager Bot Written In Python Using Pyrogram.
Stars: ✭ 187 (+1235.71%)
Mutual labels:  telegram
tg
`telegram-cli` for Telegram IM
Stars: ✭ 306 (+2085.71%)
Mutual labels:  telegram
greed
A customizable Telegram shop bot that accepts bitcoin payments
Stars: ✭ 31 (+121.43%)
Mutual labels:  telegram
AmimeWatch
Telegram bot made in Python 3 using the @pyrogram framework.
Stars: ✭ 19 (+35.71%)
Mutual labels:  telegram
YouTubeFeeds
Get new youtube video notifs, on telegram!
Stars: ✭ 29 (+107.14%)
Mutual labels:  telegram
search photo-telegram-bot-heroku
一个可以部署在heroku上的搜图机器人
Stars: ✭ 137 (+878.57%)
Mutual labels:  telegram
dark
🌛 Dark themes / mode for Rambox, Franz or Ferdi messaging services
Stars: ✭ 93 (+564.29%)
Mutual labels:  telegram
Telega
C# Telegram MTProto Client
Stars: ✭ 38 (+171.43%)
Mutual labels:  telegram
ESPecial
ESP32 automation with web interface and telegram bot
Stars: ✭ 77 (+450%)
Mutual labels:  telegram
mutegram
Disable Telegram Desktop Taskbar Flashing
Stars: ✭ 26 (+85.71%)
Mutual labels:  telegram
Komi-San
Telegram Group Management Bot based on Pyrogram
Stars: ✭ 27 (+92.86%)
Mutual labels:  telegram
QlikBotNet
Qlik Bot Net is an example chat bot which enables access to Qlik content via conversational analytics. It's built in .NET/C# and can be used with the Telegram messaging platform.
Stars: ✭ 20 (+42.86%)
Mutual labels:  telegram
pykeyboard
Best Keyboard and Pagination for the Pyrogram Library.
Stars: ✭ 42 (+200%)
Mutual labels:  telegram
Python-BlackJackBot
A Telegram bot written in Python to play the game BlackJack alone or with your friends
Stars: ✭ 48 (+242.86%)
Mutual labels:  telegram
FileStreamBot
Telegram File to Link Fastest Bot , Its Generate Direct Links Quickly
Stars: ✭ 99 (+607.14%)
Mutual labels:  telegram
memes-reposter
bot for automatic broadcasting content into telegrams channels from reddit/imgur/rss
Stars: ✭ 35 (+150%)
Mutual labels:  telegram
MIRROR-HUNTER
Who are we? We are the Hunters of all Torrent in this world.🗡️.Fork from SlamDevs
Stars: ✭ 86 (+514.29%)
Mutual labels:  telegram
vldc-bot
The official VLDC telegram group bot
Stars: ✭ 23 (+64.29%)
Mutual labels:  telegram
tgskit
Toolkit for dealing with Telegram Stickers and Bodymovin/Lottie animations.
Stars: ✭ 45 (+221.43%)
Mutual labels:  telegram
Harmonbot
Multi-Platform Factotum Bot
Stars: ✭ 30 (+114.29%)
Mutual labels:  telegram

TGPy

Run Python code right in your Telegram messages

Made with Telethon library, TGPy is a tool for evaluating expressions and Telegram API scripts.

  • Do Python calculations in dialogs
  • Interact with your messages and chats
  • Automate sending messages and more

Installation

Python 3.9+ is required.

> pip install tgpy
> tgpy

Getting started

Just send Python code to any chat, and it will be executed. Change your message to change the result.

📒 TGPy Basics

Example

Examples

Send any of these examples to any chat to evaluate:

🐍 Do Python calculations

for i in range(5):
    print(i)

Delete the current message in 5 seconds

import asyncio

await asyncio.sleep(5)
await msg.delete()

↪️ Forward the message you replied to to another chat

orig.forward_to('Chat title')

🖼 Send all chat profile photos to the same chat

photos = await client.get_profile_photos(msg.chat)
msg.reply(file=photos)

🔖 Define a function which forwards messages to Saved Messages with reply

def save():
    message = ctx.msg
    original = await message.get_reply_message()
    await original.forward_to('me')
    return 'Saved!'

🗑 Define a function which deletes messages with reply

async def delete():
    message = ctx.msg
    original = await message.get_reply_message()
    await original.delete()
    await message.delete()

TGPy Guide

Credits

License

This project is licensed under the terms of the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].