您好,我正在尝试创建一个自动执行亚马逊搜索的机器人,我希望它使用起来非常简单。 我希望它在创建新的bot时像BotFather一样起作用:
询问机器人名称
输入并获取机器人名称
询问机器人标记
输入并获取机器人标记
创建机器人
我不知道从哪里开始
到目前为止,代码已完成:
keyboard= types.ReplyKeyboardMarkup(row_width=1)
help_btn = types.KeyboardButton('Aiuto')
min_price = types.KeyboardButton('Prezzominimo')
max_price = types.KeyboardButton('Prezzomassimo')
range_price = types.KeyboardButton('Range')
keyboard.row(min_price)
keyboard.row(max_price)
keyboard.row(range_price)
keyboard.row(help_btn)
bot = telebot.AsyncTeleBot(TOKEN,'HTML')
if bot_is_active:
@bot.message_handler(commands=["start"])
def main_menu(message):
bot.send_message(message.chat.id,"Benvenuto,questo bot ti permette di cercare articoli su Amazon",reply_markup=keyboard)
pass
@bot.message_handler(func=lambda message:True)
def kb1_handler(message):
if message.text == 'Aiuto':
bot.send_message(message.chat.id,Help message)
elif message.text == 'Range':
bot.send_message(message.chat.id,"Cosa cerchi?")
#range_set = True
elif message.text == 'Prezzominimo':
bot.send_message(message.chat.id,"Cosa cerchi?")
min_set = True
else:
bot.send_message(message.chat.id,"Cosa cerchi?")
#max_set = True
pass
if min_set:
bot.send_message(message.chat.id,"trovato")
pass