From a36b90d8683aef27b595f703fd2e4594127a28b1 Mon Sep 17 00:00:00 2001 From: puregrammy Date: Fri, 30 Aug 2024 13:56:07 +0300 Subject: [PATCH] docs: fix incorrect await usage --- docs/examples/markdown/html.js | 2 +- docs/examples/markdown/markdown-v2.js | 2 +- docs/examples/markdown/markdown.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/examples/markdown/html.js b/docs/examples/markdown/html.js index 15581e98..a0788bd5 100644 --- a/docs/examples/markdown/html.js +++ b/docs/examples/markdown/html.js @@ -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 message with html markdown.' diff --git a/docs/examples/markdown/markdown-v2.js b/docs/examples/markdown/markdown-v2.js index d5117c71..125e110e 100644 --- a/docs/examples/markdown/markdown-v2.js +++ b/docs/examples/markdown/markdown-v2.js @@ -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` diff --git a/docs/examples/markdown/markdown.js b/docs/examples/markdown/markdown.js index 157fc918..58221fbe 100644 --- a/docs/examples/markdown/markdown.js +++ b/docs/examples/markdown/markdown.js @@ -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!'