小编ed *_*tru的帖子

使用 Telegram-InlineKeyboardMarkup,按下按钮时我可以向用户提供反馈吗?

def start(bot, update):
    keyboard = [[InlineKeyboardButton("Apples", callback_data='1')],
        [InlineKeyboardButton("Oranges", callback_data='2')],
        [InlineKeyboardButton("Beans", callback_data='3')],
        [InlineKeyboardButton("Rice", callback_data='4')],
        [InlineKeyboardButton("Bread", callback_data='5')],                
        [InlineKeyboardButton("Tomatos", callback_data='6')],                
        [InlineKeyboardButton("Strawberry", callback_data='7')]
    ]
    reply_markup = InlineKeyboardMarkup(keyboard)
    update.message.reply_text('Multiple choice Quizz \nSelect all vegetables:', reply_markup=reply_markup)
Run Code Online (Sandbox Code Playgroud)

使用 InlineKeyboardMarkup,是否有一种方法可以为用户按钮选择提供反馈,而无需隐藏或删除 InlineKeyboardMarkup?

例如,当用户选择 InlineKeyboardButton 时,我可以:

Change the InlineKeyboardButton text
Change the appearance of the InlineKeyboardButton
Edit initial message in update.message.reply_text ( )
Run Code Online (Sandbox Code Playgroud)

我想看看是否可以提出多项选择问题,如果可以,我需要提供一种方法让用户知道按钮已被选择或按下。

python telegram python-telegram-bot telegram-bot

5
推荐指数
1
解决办法
6744
查看次数

SQL查询输出到Delphi中的变量?

我想知道如何将SQL查询结果放入变量中.

我知道这件事

integerVariable := UniQuery1.RecordCount;
Run Code Online (Sandbox Code Playgroud)

但是这个?

integerVariable := SELECT COUNT(*) FROM Orders WHERE Amount='1000' 
Run Code Online (Sandbox Code Playgroud)

sql-server delphi unidac

2
推荐指数
1
解决办法
1万
查看次数