grammy-inline-menu

Inline Menus for Telegram made simple. Successor of telegraf-inline-menu.

MIT License

Downloads
1.8K
Stars
350
Committers
11

Bot releases are hidden (Show)

grammy-inline-menu -

Published by EdJoPaTo over 2 years ago

  • Fix calculating button absolute path length (#184) b95e62c
  • housekeeping, dependency updates, …

BREAKING CHANGE: requires Node.js 14 23cb98a

https://github.com/EdJoPaTo/grammy-inline-menu/compare/v7.0.2...v8.0.0

grammy-inline-menu -

Published by EdJoPaTo almost 3 years ago

  • fix: use @grammyjs/types and assume more types 62ae5b6

https://github.com/EdJoPaTo/grammy-inline-menu/compare/v7.0.1...v7.0.2

grammy-inline-menu -

Published by EdJoPaTo about 3 years ago

  • chore(npm): highlight being successor of telegraf-inline-menu 6baba82

https://github.com/EdJoPaTo/grammy-inline-menu/compare/v7.0.0...v7.0.1

grammy-inline-menu -

Published by EdJoPaTo about 3 years ago

Migration from Telegraf to grammY

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

grammy-inline-menu -

Published by EdJoPaTo about 3 years ago

grammy-inline-menu -

Published by EdJoPaTo about 3 years ago

grammy-inline-menu -

Published by EdJoPaTo over 3 years ago

  • fix: adapt to new internal typing locations f7fb05c

Somewhat breaking: requires telegraf v4.3

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v6.2.0...v6.2.1

grammy-inline-menu -

Published by EdJoPaTo over 3 years ago

  • feat(template): add manualAction 3d2e6e7
  • fix(middleware): improve detection of bad rootTriggers cd23a88

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v6.1.0...v6.2.0

grammy-inline-menu -

Published by EdJoPaTo over 3 years ago

  • refactor(send-menu): improve return type of edit functions ed79741

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v6.0.0...v6.1.0

grammy-inline-menu - v6.0 - Migrate to telegraf v4

Published by EdJoPaTo over 3 years ago

  • migrate to telegraf v4

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.3.0...v6.0.0

Migrate from version 5 to version 6

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.

grammy-inline-menu -

Published by EdJoPaTo almost 4 years ago

  • feat: migrate to telegraf v4 3a2698f

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

grammy-inline-menu -

Published by EdJoPaTo about 4 years ago

  • feat(choices): allow usage of Map<number, string> 83b0d3b
  • fix(choices): readonly record 8c8c6d5

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.2.1...v5.3.0

grammy-inline-menu -

Published by EdJoPaTo about 4 years ago

  • chore(npm): using types is a dependency d495d9b

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.2.0...v5.2.1

grammy-inline-menu -

Published by EdJoPaTo about 4 years ago

  • feat(body): add LocationBody and VenueBody 26348af

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.1.0...v5.2.0

grammy-inline-menu -

Published by EdJoPaTo about 4 years ago

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.0.2...v5.1.0

grammy-inline-menu -

Published by EdJoPaTo about 4 years ago

  • fix(send-menu): hint supplied menu paths without ending slash 72f32db

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.0.1...v5.0.2

grammy-inline-menu -

Published by EdJoPaTo about 4 years ago

  • fix(choices): throw on choicekey containing a slash 5b61648

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.0.0...v5.0.1

grammy-inline-menu - Version 5 Release

Published by EdJoPaTo over 4 years ago

With this major release logic is splitted into multiple classes to be way more customizable than before.
Things like sending the menu manually is now way easier.

As there as new classes you need to refactor from version 4. See the Migration Guide.

If you have questions, ideas, … please check for existing Issues and feel free to open new Issues and Pull Requests!

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v4.0.1...v5.0.0

new since v5-rc.1

  • feat(choices): disable choice exists check 3c91a09

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.0.0-rc.1...v5.0.0

grammy-inline-menu -

Published by EdJoPaTo over 4 years ago

I currently think the beta is on a fairly stable point. I will keep this rc for some days. If there are no issues this will probably the stable version 5.0.

  • feat: select/toggle update menu afterwards is now explicit 5e09689
  • feat: interact/choose update menu afterwards is now explicit a976369
  • fix(path): empty string is not a relative path 7d9c261

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.0.0-beta.9...v5.0.0-rc.1

grammy-inline-menu -

Published by EdJoPaTo over 4 years ago

  • feat(middleware): allow for rootTrigger RegExp 7249107
  • fix(template): implement pagination different from choice 27b9f09
  • fix(middleware): answerCbQuery when menu is sent 3ba6f62
  • fix(middleware): throw on invalid target of do function 683fcc4

https://github.com/EdJoPaTo/telegraf-inline-menu/compare/v5.0.0-beta.8...v5.0.0-beta.9