menu
menu copied to clipboard
feat: Default payloads
It's a common thing to create menu ranges where all buttons have the same payload object.
It would be useful if one could do
const range = new MenuRange({ payload: 'default-payload' })
which would then be set as the default value for all buttons on that range. Hence, it is sufficient to pass a string to range.text instead of always having to specify the same payload.
It needs yet to be decided whether or not the default payload should be passed on the menu ranges created for dynamic ranges inside range, but it's likely this this is not a good idea.