Inline Menus for Telegram made simple. Successor of telegraf-inline-menu.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] 5 months ago
BREAKING CHANGE: required argument provider_token
is gone. This is not done as a breaking change in grammY either so this is breaking there too.
Published by github-actions[bot] 7 months ago
The main change of this release is the move of longer MenuTemplate
arguments into the options object.
This results in shorter lines and easier code readability.
It also allows to inline methods easier.
-menuTemplate.interact((ctx) => ctx.i18n.t('button'), 'unique', {
+menuTemplate.interact('unique', {
+ text: (ctx) => ctx.i18n.t('button'),
do: async (ctx) => {
…
}
}
-menuTemplate.url('Text', 'https://edjopato.de', { joinLastRow: true });
+menuTemplate.url({ text: 'Text', url: 'https://edjopato.de', joinLastRow: true });
-menuTemplate.choose('unique', ['walk', 'swim'], {
+menuTemplate.choose('unique', {
+ choices: ['walk', 'swim'],
do: async (ctx, key) => {
…
}
}
Also Node.js 18 and ES modules are now required when using this library.
Published by github-actions[bot] over 1 year ago
BREAKING CHANGE: requires Node.js 14 23cb98a
https://github.com/EdJoPaTo/grammy-inline-menu/compare/v7.0.2...v8.0.0
https://github.com/EdJoPaTo/grammy-inline-menu/compare/v7.0.1...v7.0.2
https://github.com/EdJoPaTo/grammy-inline-menu/compare/v7.0.0...v7.0.1
This version switches from Telegraf to grammY as a Telegram Bot framework. grammY has various benefits over Telegraf as Telegraf is quite old and grammY learned a lot from its mistakes and shortcomings.
Supporting both Telegraf and grammY would have increased the complexity a lot. Seeing grammY as the way to go and the library of choice for my bots it was the best way to move forward in my opinion.
If you are still using Telegraf you can continue to use v6 but you should consider migrating to grammY.
-import {Telegraf} from 'telegraf'
-import {MenuTemplate, MenuMiddleware} from 'telegraf-inline-menu'
+import {Bot} from 'grammy'
+import {MenuTemplate, MenuMiddleware} from 'grammy-inline-menu'
https://github.com/EdJoPaTo/grammy-inline-menu/compare/v6.3.0...v7.0.0
https://github.com/EdJoPaTo/grammy-inline-menu/compare/v6.3.0...v7.0.0-beta.1
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v6.2.1...v6.3.0
Somewhat breaking: requires telegraf v4.3
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v6.2.0...v6.2.1
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v6.1.0...v6.2.0
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v6.0.0...v6.1.0
Published by EdJoPaTo over 3 years ago
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.3.0...v6.0.0
Version 6 switched from telegraf 3.38 to 4.0. See the telegraf migration guide for this set of changes.
telegraf-inline-menu is relativly unaffected by this.
The only change required besides the telegraf changes is the change of ctx.match
.
Simply add match
to your MyContext
type:
export interface MyContext extends TelegrafContext {
readonly match: RegExpExecArray | undefined;
…
}
telegraf knows when match is available or not.
The default Context does not have match anymore.
telegraf-inline-menu should also know this in a future release.
Known issue: context.match
typings are not available like they are when using bot.action(context => { console.log(context.match); }
.
Check details in #144
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.3.0...v6.0.0-alpha1
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.2.1...v5.3.0
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.2.0...v5.2.1
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.1.0...v5.2.0
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.0.2...v5.1.0
https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.0.1...v5.0.2