Skip to content

Instantly share code, notes, and snippets.

View MohammadHosseinGhorbani's full-sized avatar

Mohammad Hossein Ghorbani MohammadHosseinGhorbani

View GitHub Profile
@MohammadHosseinGhorbani
MohammadHosseinGhorbani / conversation.py
Last active May 8, 2024 09:10
Conversations in pyrogram (no extra package needed)
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
@MohammadHosseinGhorbani
MohammadHosseinGhorbani / dirty-brainfuck-interpreter.py
Created March 10, 2024 21:20
Dirtiest Brainfuck Interpreter I've Ever Seen (But It Works)
memory = [0]
pointer = 0
loop = False
loop_start = 0
loop_point = 0
bf_code = '<BRAINFUCK CODE>'
def check_char(char):
global memory, pointer
@MohammadHosseinGhorbani
MohammadHosseinGhorbani / godot-telegram-game-article.md
Last active July 14, 2024 16:39
Making a Telegram game with Godot

Telegram Games

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.

Let's get started!

The Telegram Bot