Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/unmaintainedprojects/keyboard

Build reply markup keyboards easier than ever.
https://github.com/unmaintainedprojects/keyboard

go gotgbot telegram

Last synced: 6 days ago
JSON representation

Build reply markup keyboards easier than ever.

Awesome Lists containing this project

README

        

# gotgbot keyboard

Build reply markup keyboards easier than ever.

## Installation

```bash
go get github.com/gotgbot/keyboard
```

## Docs

[go.dev](https://pkg.go.dev/github.com/gotgbot/keyboard)

## Example

### Inline

```go
import "github.com/gotgbot/keyboard"

...

query := "query"

ctx.Message.Reply(
b,
"text",
&gotgbot.SendMessageOpts{
ReplyMarkup: new(
keyboard.InlineKeyboard,
).Text(
"text",
"callback data",
).Url(
"text",
"https://github.com/gotgbot/keyboard",
).Row(
).SwitchInline(
"text",
&query,
).Build()
}
)
```

### Reply

```go
import "github.com/gotgbot/keyboard"

...

ctx.Message.Reply(
b,
"text",
&gotgbot.SendMessageOpts{
ReplyMarkup: new(
keyboard.Keyboard,
).Text(
"text",
).RequestContact(
"text",
).Row(
).RequestPoll(
"text",
"type",
).Build()
}
)
```

## Credits

- [grammY framework](https://github.com/grammyjs/grammY)