https://github.com/aliwoto/mdparser
mdparser for telegram API using MarkDownV2.
https://github.com/aliwoto/mdparser
bot bot-api markdown markdown-v2 telegram telegram-bot telegram-bot-api
Last synced: 10 months ago
JSON representation
mdparser for telegram API using MarkDownV2.
- Host: GitHub
- URL: https://github.com/aliwoto/mdparser
- Owner: ALiwoto
- License: mit
- Created: 2021-07-24T08:14:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-27T07:12:11.000Z (over 1 year ago)
- Last Synced: 2025-04-11T22:06:42.317Z (10 months ago)
- Topics: bot, bot-api, markdown, markdown-v2, telegram, telegram-bot, telegram-bot-api
- Language: Go
- Homepage:
- Size: 49.8 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mdparser
mdparser for telegram bot API
## How to use
First you need to get the package:
`go get -u github.com/ALiwoto/mdparser`
then you can use the package like this:
```go
import "github.com/ALiwoto/mdparser"
func sendMessage(msg Message) {
md := mdparser.GetBold("This is a message").AppendNormal(":\n")
md = md.AppendItalic("Italic\n")
md = md.AppendMono("Mono space\n")
md = md.AppendHyperLink("text", "https://google.com")
msg.Reply(md.ToString(), options{version: "MarkdownV2"})
}
```