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

selector inline mode handle not listener callback button pressed #693

Open
JunaYa opened this issue Jun 14, 2024 · 1 comment
Open

selector inline mode handle not listener callback button pressed #693

JunaYa opened this issue Jun 14, 2024 · 1 comment

Comments

@JunaYa
Copy link

JunaYa commented Jun 14, 2024

selctor inline button display success, but button pressed not handle callback. please help.

       var (
		selectorFirst = &tele.ReplyMarkup{}
		btnPrev    = selectorFirst.URL("<", "prev", "abc")
		btnNext     = selectorFirst.Data(">", "next", "123")
	)

	selectorFirst.Inline(
		selectorFirst.Row(btnPrev, btnNext),
	)

	b.Handle(&btnNext, func(c tele.Context) error {
		fmt.Println("btnNext button pressed")
		return c.Respond()
		// return c.Send("welcome start", selector)
	})

	b.Handle("/start", func(c tele.Context) error {
		return c.Send("hi", selectorFirst)
	})
@subliker
Copy link

Try

tele.Settings{
		...
		Poller:  &tele.LongPoller{..., AllowedUpdates: []string{"message", "chat_member", "callback_query"}},
		...
	}

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