Skip to content

Commit 965dbdc

Browse files
authored
Merge pull request #43 from D-Shestak/patch-8
Update step-by-step-guide.mdx
2 parents b67993b + 6a083d2 commit 965dbdc

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# TMA Launch Tutorial
22

3-
Telegram Mini Apps (TMA) are web applications that run inside the Telegram messenger. They are built using web technologiesHTML, CSS, and JavaScript. Telegram Mini Apps can be used to create DApps, games, and other types of apps that can be run inside Telegram.
3+
Telegram Mini Apps (TMA) are web applications that run inside the Telegram messenger. They are built using web technologiesHTML, CSS, and JavaScript. Telegram Mini Apps can be used to create DApps, games, and other types of apps that can be run inside Telegram.
44

55
## Create your App
66

7-
1. To connect your Mini App to Telegram, place the SDK script `telegram-web-app.js` using this code:
7+
1. To connect your Mini App to Telegram, add the SDK script `telegram-web-app.js` using this code:
88

99
```html
1010
<script src="https://telegram.org/js/telegram-web-app.js"></script>
1111
```
1212
:::tip
13-
It's preferable to switch off cache in the HTML. To ensure your cache is switched off, specify headers in your request according to the following:
13+
It's best to disable caching in the HTML. To ensure your caching is turned off, specify these headers in your request:
1414

1515
```curl
1616
Cache-Control: no-store, must-revalidate
@@ -19,43 +19,43 @@ Expires: 0
1919
```
2020
:::
2121

22-
2. Once the script is connected, a **[window.Telegram.WebApp](https://core.telegram.org/bots/webapps#initializing-web-apps)** object becomes available. You can read more about creating Mini App utilizing [`telegram-web-app.js`](/v3/guidelines/dapps/tma/tutorials/app-examples#basic-tma-example) here.
22+
2. Once the script is connected, the **[window.Telegram.WebApp](https://core.telegram.org/bots/webapps#initializing-web-apps)** object becomes available. Learn more about creating Mini App using [`telegram-web-app.js`](/v3/guidelines/dapps/tma/tutorials/app-examples#basic-tma-example) here.
2323

24-
3. The modern way to connect SDK is an NPM package for Telegram Mini Apps SDK:
24+
3. You can also connect the SDK using the NPM package for Telegram Mini Apps SDK:
2525

2626
```bash npm2yarn
2727
npm i @twa-dev/sdk
2828
```
2929

30-
You can find a guide for [`@twa-dev/sdk`](/v3/guidelines/dapps/tma/tutorials/app-examples#modern-tma-example ) here.
30+
Find a guide for [`@twa-dev/sdk`](/v3/guidelines/dapps/tma/tutorials/app-examples#modern-tma-example ) here.
3131

32-
5. When your Mini App is ready and deployed to the web server, follow to the next step.
32+
5. Once your Mini App is ready and deployed to a web server, move on to the next step.
3333

3434
## Setting Up a Bot for the App
3535

36-
To connect your Mini App to Telegram, you need to create a bot and set up a Mini App for it. Follow these steps to set up a new Telegram bot:
36+
To connect your Mini App to Telegram, you need to create a bot and set up a Mini App for it. Follow these steps:
3737

3838
### 1. Start a Chat with BotFather
3939

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

4444
### 2. Create a New Bot
4545

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

5050
### 3. Set Up Bot Mini App
5151

52-
- Send `/mybots` command to BotFather.
53-
- Choose your bot from the list and the **Bot settings** option
54-
- Choose **Menu button** option
55-
- Choose **Edit menu button URL** option and send URL to your Telegram Mini App, for example link from GitHub Pages deploy.
52+
- Send the `/mybots` command to BotFather.
53+
- Select your bot from the list and choose **Bot settings**.
54+
- Select **Menu button**.
55+
- Choose **Edit menu button URL** and send URL to your Telegram Mini App (e.g., a link from GitHub Pages deployment).
5656

57-
### 4. Accessing the Bot
57+
### 4. Access the Bot
5858

59-
- You can now search for your bot using its username in Telegram's search bar.
60-
- Press the button next to attach picker to launch your Telegram Mini App in messenger
59+
- Search for your bot using its username in Telegram's search bar.
60+
- Click the button next to attach picker to launch your Telegram Mini App in messenger.
6161
- You’re awesome!

0 commit comments

Comments
 (0)