S
S
spoT12021-10-24 23:25:45
JavaScript
spoT1, 2021-10-24 23:25:45

How to pass the division operator to the callback value?

const gameOptions = {
    reply_markup: JSON.stringify({
        inline_keyboard:[
            [{text: 'Pi',callback_data: Math.PI.toFixed(2)}],[{text: '/',callback_data: }],

            
        ]
    })
}


How to pass the value of the division operator to the callback_data value?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2021-10-24
@sergiks

In InlineKeyboardButton , a string is expected for the field callback_data, so:
callback_data: "/"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question