Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

I can't send a list #20

Closed
jkupovic opened this issue Aug 6, 2022 · 2 comments
Closed

I can't send a list #20

jkupovic opened this issue Aug 6, 2022 · 2 comments

Comments

@jkupovic
Copy link

jkupovic commented Aug 6, 2022

I do not know how to do it

let sections = [{
            "title": "Afternoon slots",
            "rows": [{"id": "1",
                    "title": "13:00",
                    "description": "Collection: Crouch End Bakery"
                },
                {"id": "2",
                    "title": "13:30",
                    "description": "Collection: Hampstead Bakery"
                },
                {"id": "3",
                    "title": "13:00",
                    "description": "Collection: Hampstead Bakery"
                }
            ]
        },
        {
            "title": "Evening slots",
            "rows": [{"id": "4",
                    "title": "18:00",
                    "description": "Collection: Crouch End Bakery"
                },
                {"id": "5",
                    "title": "18:30",
                    "description": "Collection: Hampstead Bakery"
                },
                {"id": "6",
                    "title": "17:00",
                    "description": "Collection: Crouch End Bakery"
                }
            ]
        }
    ];
const result4 = await bot.sendList(to, 'asdf', 'fdsa', sections, '');

what is the mistake?

@RyzorBent
Copy link

 hi @jkupovic 

the below code worked for me.

     `await bot.sendList(to, 'JustList', 'this is the body text', {
            'test section tile': [
              {
                id: 'sec_id',
                title: 'sec title',
                description: 'sec description',
              },
              {
                id: 'sec_id2',
                title: 'sec title2',
                description: 'sec description2',
              },
              {
                id: 'sec_id3',
                title: 'sec title3',
                description: 'sec description3',
              },
              {
                id: 'sec_id4',
                title: 'sec title4',
                description: 'sec description4',
              },
            ],
          });`

Screenshot 2022-08-07 at 17 26 55

@jkupovic
Copy link
Author

jkupovic commented Aug 7, 2022

Thank you very much, it works perfectly
=D

@jkupovic jkupovic closed this as completed Aug 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants