Skip to content

Send data with callback_data #2815

Answered by Bibo-Joshi
Adrian-MorenoG asked this question in Q&A
Discussion options

You must be logged in to vote

Hi.
callback_data = 'function2' + '$subject_id' gives the constant string 'function2$subject_id'. If you want to insert the subject_id into the string, you should use e.g. f'funtion2 {subject_id} - please look up "python string formatting" on your favorite search engine
Also in function2 you don't even access query.data.
I recommend to have a look at this example.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Adrian-MorenoG
Comment options

@Bibo-Joshi
Comment options

@Adrian-MorenoG
Comment options

Answer selected by Adrian-MorenoG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants