This is just for fun and not a proper way to develop Telegram bots.
First, install the python-telegram-bot
package:
python install -U python-telegram-bot
### Example 1: | |
>>> format_eval("Hello {{ 'world'.upper() }}") | |
'Hello WORLD' | |
### Example 2: | |
>>> import requests | |
>>> format_eval("Request to Google: Code {{ requests.get('https://google.com').status_code) }}") | |
'Request to Google: Code SyntaxError' | |
>>> format_eval("Request to Google: Code {{ requests.get('https://google.com').status_code }}") | |
'Request to Google: Code 200' |
Telegram is a powerful messenger app with many features; such as games! You can use a Telegram bot and an HTML5 page to share your game in Telegram. The main part of this thing is the HTML5 web page that is your game, Telegram is used to share your game and record the players' score. We will use Godot for the HTML5 part, and Python for the Telegram bot.
Telegram bots can be created using any programming language, therefore Python is not a requirement.
You can read more about Telegram games here.
memory = [0] | |
pointer = 0 | |
loop = False | |
loop_start = 0 | |
loop_point = 0 | |
bf_code = '<BRAINFUCK CODE>' | |
def check_char(char): | |
global memory, pointer |
from pyrogram import Client, filters | |
app = Client('CONVERSATION_EXAMPLE') | |
conversations = {} | |
infos = {} | |
def conv_filter(conversation_level): | |
def func(_, __, message): | |
return conversations.get(message.from_user.id) == conversation_level |