Skip to content

Commit

Permalink
docs: fix incorrect await usage
Browse files Browse the repository at this point in the history
  • Loading branch information
puregrammy committed Aug 30, 2024
1 parent fbafe8d commit a36b90d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/examples/markdown/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Telegram, HTML } from 'puregram'

const telegram = Telegram.fromToken(process.env.TOKEN)

telegram.updates.on('message', (context) => {
telegram.updates.on('message', async (context) => {
const message = `a ${HTML.bold('message')} with ${HTML.italic('html markdown')}!`
const anotherMessage = 'another <b>message</b> with <i>html markdown</i>.'

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/markdown/markdown-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const telegram = Telegram.fromToken(process.env.TOKEN)
// INFO: are you sure you want to use it?
// -> https://core.telegram.org/bots/api#markdownv2-style <-

telegram.updates.on('message', (context) => {
telegram.updates.on('message', async (context) => {
const message = `a ${MarkdownV2.bold('message')} with some ${MarkdownV2.strikethrough('epic')} ${MarkdownV2.underline('markdown')}\\!`
const anotherMessage = 'same *message* with ~epic~ __markdown__\\.'
const oneMoreMessage = MarkdownV2.build`
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/markdown/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Telegram, Markdown } from 'puregram'

const telegram = Telegram.fromToken(process.env.TOKEN)

telegram.updates.on('message', (context) => {
telegram.updates.on('message', async (context) => {
const message = `a ${Markdown.bold('message')} with ${Markdown.italic('markdown')}!`
const anotherMessage = 'one more *message* with _markdown_, but without a class!'

Expand Down

0 comments on commit a36b90d

Please sign in to comment.