telegram-bot - 如何使用 answerInlineQuery Telegram 机器人发送 inlineKeyboard
问题描述
我有一个带有irazasyed包的电报机器人,现在当用户键入(@botid aboutus)机器人为用户显示如下文本时,将其设置为“内联模式”:
解决方案
解决了!
$results= json_encode( [
[
'type' => "article",
'id'=> "1",
'title'=> "chek inline keybord ",
'description'=> "test ",
'caption'=> "caption" ,
'input_message_content'=> ['message_text' => "you can share inline keyboard to other chat"],
'reply_markup'=>['inline_keyboard'=>[
[
['text'=>"text1",'url'=>''],
['text'=>"text2",'url'=>''],
['text'=>"shareToOtherChat",'switch_inline_query'=>'chek']
]
]],
'thumb_url'=> "https://avatars2.githubusercontent.com/u/10547598?v=3&s=88",
]
] );
推荐阅读
- mysql - MYSQL 创建表语句给我“非唯一”错误?
- c# - 用数据表中的 ID 替换名称的快速方法?
- python - 将特定列的值与不同文件进行比较
- python - 无法解压不可迭代的 int 对象
- python - 如何将辅助 python 文件上传到谷歌云平台?
- google-apps-script - 即使 logger.log 确认了他们的数据,谷歌网络应用服务器也会返回 null
- ibm-cloud - Watson 服务的监控和日志记录
- css - 如何通过 SCSS 导入和使用 Bulma 框架,但不将其所有内容导出到 CSS
- gradle - 如何调用带有参数的jar中的gradle任务
- python - 当对象与表单字段名称不匹配时,在 Flask 视图中填充 WTForm FormField