You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Open Botfather https://t.me/botfather and follow the instructions to create your bot (e.g, Desco Balance Bot). You will get a telegram bot token.
22
+
2. Copy and add it to `TELEGRAM_BOT_TOKEN` in the `.env` file.
23
+
3. Send a `hi/hello` chat to your new bot.
24
+
4. Open this URL in your browser `https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/getUpdates`
25
+
5. Copy the chat `id` value and add it to the `TELEGRAM_CHAT_ID` in the `.env` file.
26
+
27
+
## Run the script:
28
+
29
+
```bash
30
+
python check_balance.py
31
+
```
32
+
33
+
Output:
34
+
35
+
```bash
36
+
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'prepaid.desco.org.bd'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
37
+
warnings.warn(
38
+
39
+
(True, 'Telegram sent')
40
+
```
41
+
42
+
Ignore the SSL warning for now (I will update it later); you should see (True, 'Telegram sent`)
43
+
44
+
And receive a message in your Telegram app.
45
+
46
+
## Known issues:
47
+
48
+
It is possible that behind the scenes, DESCO is using multiple endpoints for quering various Meter types.
0 commit comments