Skip to content

Commit

Permalink
docs(menuPhoto): add to README
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo committed Mar 19, 2019
1 parent e4b40ab commit 321df8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Methods often have these parameters:
- `joinLastRow` (optional, Boolean)
When set to true the button will try to join the row before. Useful in order to create buttons side by side.

### `const menu = new TelegrafInlineMenu(text)`
### `const menu = new TelegrafInlineMenu(text, {photo})`

Creates a new Menu.

Expand All @@ -67,6 +67,10 @@ Example: When this is called with `a` and `toggle('c', …)` is called the resu
`text` is the text in the message itself.
This can be a `string` or `function(ctx)`.

`photo` is an identifier for a photo.
See [Telegraf Documentation: Working with files](https://telegraf.js.org/#/?id=working-with-files).
Can be the identifier as a constant or a function returning it.

### `bot.use(menu.init({backButtonText, mainMenuButtonText, actionCode}))`

This is used to apply the menu to the bot.
Expand Down

0 comments on commit 321df8b

Please sign in to comment.