Send a menu to a chat id
See original GitHub issueDescribe your goal
I wan’t to send the user a menu from external events, so no context
exists. Is this even possible?
I’m sorry if this question is a duplicate and I missed the issue where this is covered!
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Telegram Bot - how to get a group chat id? - Stack Overflow
Use the "id" of the "chat" object to send your messages. ... group name on the left menu; click 'inspect' button; you will...
Read more >How to Find a Chat ID in Telegram - Alphr
1. Tap to open the Telegram app. 2. In the top-right corner, tap on the small magnifying glass icon. 3. Type @RawDataBot in...
Read more >Chat Plugin - Messenger Platform - Meta for Developers
This document shows you how to programmatically add the Chat Plugin to your ... Your business can then use the user reference ID...
Read more >Add a Bot Options Menu to the Chat Window (Optional)
To let your customers know what your bot can do and to provide consistent navigation, add a persistent options menu to the chat...
Read more >Send Notifications Using Chat API | Courier Docs
Looking for a way to send notifications via Chat API? This step-by-step tutorial will show you how to integrate Chat API the easy...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
When I saw that function in the readme i wondered why telegram had to be supplied on the resulting function each time. Like “that should have been refactored”… Looks like it was but someone (ehm…) forgot to update that. Thanks for your time looking into that!
You need the same
Context
as theMenuTemplate<Context>
has. That can be anything. (The Template is different to theMenuMiddleware<Context extends TelegrafContext>
which requires the context to be at least what Telegraf offers.)Because of that you can create very simple templates requiring only a few things in the context (or even nothing). Everything your Template uses from the context has to be provided. MenuMiddleware provides the context of Telegraf for the Template. If you send the menu yourself you have to provide the context yourself. But you can decide what has to be in there.
For example if your template uses the session then someone has to provide the session into the context. If you don’t use the session from the template, you don’t need to provide it.