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/callbackQuery/edit.py

16 lines
614 B
Python
Raw Normal View History

from telegram import Update, ParseMode
from telegram.ext import CallbackContext
from main import messages, local
def edit(update: Update, context: CallbackContext):
context.bot.send_message(chat_id=update.effective_chat.id,
text=f"Send the new value for `{local[update.callback_query.data.replace('edit_', '')]}`",
parse_mode=ParseMode.MARKDOWN_V2)
if update.effective_chat.id not in messages:
messages[update.effective_chat.id] = {}
2020-11-07 12:16:52 +01:00
messages[update.effective_chat.id][update["_effective_user"]["id"]] = update.callback_query.data