Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/unmaintainedprojects/keyboard
- Owner: UnmaintainedProjects
- License: lgpl-3.0
- Created: 2021-09-12T12:32:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-13T07:44:08.000Z (over 3 years ago)
- Last Synced: 2024-12-10T16:15:19.543Z (12 days ago)
- Topics: go, gotgbot, telegram
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)