Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
teleexit/message/main.py

16 lines
565 B
Python

from telegram import Update
from telegram.ext import CallbackContext, MessageHandler, Filters
from main import messages
from message.edit import edit
def message(update: Update, context: CallbackContext):
if update.effective_chat.id in messages:
if update["_effective_user"]["id"] in messages[update.effective_chat.id]:
data = messages[update.effective_chat.id][update["_effective_user"]["id"]]
if data.startswith("edit_"):
edit(update, context, data)
message_handler = MessageHandler(Filters.text, message)