我想帮助制作子菜单,从菜单号“1”开始。我尝试使用下面的代码,但它不起作用。
这是我的代码:
@signals.message_received.connect
def handle(message):
# Main menu
if message.command == "Olá":
menuPrincipal(message)
# 1 - Budgeting
elif message.command == "1":
orcamentos(message)
# 2 - Track an order already in progress
elif message.command == "2":
pedidoAndamento(message)
# 3 - Change the date, time or location of the event
elif message.command == "3":
alterarPedido(message)
# 4 - Special Offers
elif message.command == "4":
promocoes(message)
# 5 - Speak to a representative
elif message.command == "5":
chamarRepresentante(message)
以下是orcamentos()
我想作为子菜单的功能:
def orcamentos(message):
mac.send_message(txtOrcamentos, message.conversation)
# 1 Party kit
if message.command == "1":
partyKit(message)
# 2 Confectionery cake
elif message.command == "2":
confCake(message)
# 3 Salty pie
elif message.command == "3":
saltPie(message)
# 4 Cupcakes
elif message.command == "4":
cupcakes(message)
# 5 Sweets
elif message.command == "5":
sweets(message)
# 6 Salty
elif message.command == "6":
salty(message)