14 lines
511 B
Python
14 lines
511 B
Python
from telegram import Update
|
|
from telegram.ext import ContextTypes
|
|
from app.bot.handlers.drafts import STATE_DRAFT, KEY_DRAFT_ID
|
|
|
|
async def dbg_state_cmd(update: Update, ctx: ContextTypes.DEFAULT_TYPE):
|
|
ud = ctx.user_data
|
|
s = (
|
|
f"draft_id={ud.get(KEY_DRAFT_ID)!r}, "
|
|
f"state={ud.get(STATE_DRAFT)!r}, "
|
|
f"await_dict={bool(ud.get('await_dict_file'))}, "
|
|
f"await_chat_id={bool(ud.get('await_chat_id'))}"
|
|
)
|
|
await update.effective_message.reply_text("user_data: " + s)
|