cuddly-elephant-53641
05/28/2024, 7:24 PMconst messages = [{ text: '12313132131' }]
for (const message of messages) {
await client.createMessage({
payload: { type: 'text', text: message.text },
'x-user-key': event.userId,
conversationId: event.conversationId
})
}
https://cdn.discordapp.com/attachments/1245095412897943562/1245095413019840577/Captura_de_Tela_2024-05-28_as_16.03.29.png?ex=665780f7&is=66562f77&hm=17613ff8d8d654a109df54c4cf1eef22022c5ba40cf3ef382cb7a5b7dca11dc7&aloof-traffic-22451
05/28/2024, 8:35 PMsquare-energy-41150
05/28/2024, 8:35 PMsquare-energy-41150
05/28/2024, 8:35 PMcuddly-elephant-53641
05/28/2024, 8:39 PMaloof-traffic-22451
05/28/2024, 8:41 PMcuddly-elephant-53641
05/28/2024, 8:43 PMcuddly-elephant-53641
05/28/2024, 8:43 PMcuddly-elephant-53641
05/28/2024, 8:43 PMcuddly-elephant-53641
05/28/2024, 8:45 PMbot.sendMessage(option)
in a for loop and it would solve the problemcuddly-elephant-53641
05/28/2024, 8:45 PMbot.sendSingleChoice(choices)
aloof-traffic-22451
05/28/2024, 8:47 PMFast - 100$
Normal - 95$
Slow - 90$
PickUp - 80$
It would be easier to parse the string into desired formatcuddly-elephant-53641
05/28/2024, 8:50 PM[
{
"id": 1,
"description": "Fast: Up to 30 min,
"unit_price": 112,
"formatted_unit_price": "$ 112,00"
},
{
"id": 2,
"description": "Normal: up to 60 min",
"unit_price": 109,
"formatted_unit_price": "$ 109,00"
},
{
"id": 3,
"description": "Scheduled: choose a time of the time",
"unit_price": 106,
"formatted_unit_price": "$ 106,00"
{
"id": 4,
"description": "Pick up: Choose a location to pick up your item",
"unit_price": 85,
"formatted_unit_price": "$ 85,00"
}
]
cuddly-elephant-53641
05/28/2024, 8:51 PMcuddly-elephant-53641
05/28/2024, 8:53 PMaloof-traffic-22451
05/28/2024, 8:59 PMcuddly-elephant-53641
05/28/2024, 9:01 PMaloof-traffic-22451
05/28/2024, 9:02 PMcuddly-elephant-53641
05/28/2024, 9:02 PMaloof-traffic-22451
05/28/2024, 9:02 PMcuddly-elephant-53641
05/28/2024, 9:03 PMaloof-traffic-22451
05/28/2024, 9:03 PMcuddly-elephant-53641
05/28/2024, 9:04 PMaloof-traffic-22451
05/28/2024, 9:07 PM