Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants