Skip to content

Commit

Permalink
links fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SwiftAdviser committed Sep 12, 2023
1 parent c1db78f commit 1febc62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
27 changes: 2 additions & 25 deletions docs/develop/dapps/telegram-apps/app-examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -288,32 +288,9 @@ And now we need to create Telegram Bot so we can launch Telegram Web App within

### Setting Up a Bot for the App

Follow these steps to set up a new Telegram bot:
To connect your Web App to the Telegram, you need to create a bot and set up a web app for it. Follow these steps to set up a new Telegram bot:

#### 1. Start a Chat with BotFather

- Open the Telegram app or web version.
- Search for `@BotFather` in the search bar or follow the link [https://t.me/BotFather](https://t.me/BotFather).
- Start a chat with BotFather by clicking on the `START` button.

#### 2. Create a New Bot

- Send `/newbot` command to BotFather.
- BotFather will ask you to choose a name for your bot. This is a display name and can contain spaces.
- Next, you'll be asked to choose a username for your bot. This must end in `bot` (e.g., `sample_bot`) and be unique.

#### 3. Set Up Bot Web App

- Send `/mybots` command to BotFather.
- Choose your bot from the list and the **Bot settings** option
- Choose **Menu button** option
- Choose **Edit menu button URL** option and send URL to your Telegram Web App, for example link from GitHub Pages deploy.

#### 4. Accessing the Bot

- You can now search for your bot using its username in Telegram's search bar.
- Press the button next to attach picker to launch your Telegram Web App in meseenger
- You’re awesome!
<Button href="/develop/dapps/telegram-apps/step-by-step-guide#setting-up-a-bot-for-the-app" colorType={'primary'} sizeType={'sm'}>Setup a Bot</Button>

### Hints

Expand Down
4 changes: 2 additions & 2 deletions docs/develop/dapps/telegram-apps/step-by-step-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Telegram Web Apps are web applications that run inside the Telegram messenger. T
```


2. Once the script is connected, a **[window.Telegram.WebApp](https://core.telegram.org/bots/webapps#initializing-web-apps)** object become available. You can read more about creating Web App utilising [`telegram-web-app.js`](https://core.telegram.org/bots/webapps#initializing-web-apps) here.
2. Once the script is connected, a **[window.Telegram.WebApp](https://core.telegram.org/bots/webapps#initializing-web-apps)** object become available. You can read more about creating Web App utilising [`telegram-web-app.js`](https://docs.ton.org/develop/dapps/telegram-apps/app-examples#basic-twa-example) here.

3. The modern way to connect SDK is npm package for Telegram Web Apps SDK:

```bash npm2yarn
npm i @twa-dev/sdk
```

You can find guide for [`@twa-dev/sdk`](https://docs.twa.dev/docs/libraries/twa-js-sdk/about) here.
You can find guide for [`@twa-dev/sdk`](https://docs.ton.org/develop/dapps/telegram-apps/app-examples#modern-twa-example ) here.

5. When your Web App is ready and deployed to the web server, follow to the next step.

Expand Down

0 comments on commit 1febc62

Please sign in to comment.