File size: 1,449 Bytes
868f534
 
5b9bc06
868f534
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5b9bc06
868f534
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import asyncio
import aiohttp
from core.config import settings

async def main():
    async with aiohttp.ClientSession() as s:
        help_text = (
            "📚 **FlyRates Bot Help** 📚\n\n"
            "Here are the commands you can use:\n\n"
            "**Basic Commands**\n"
            "`/start` - Get welcome message\n"
            "`/help` - Show this help menu\n\n"
            "**Rates & Updates**\n"
            "`/current <base> <target>` - Get the live rate\n"
            "`/subscribe <base> <target> [daily/hourly]` - Automate updates\n"
            "`/threshold <base> <target> <condition> <value>` - Get custom alerts (<, >, <=, >=)\n\n"
            "**Management**\n"
            "`/mysubs` - View all your active subscriptions and alerts\n"
            "`/unsubscribe <base> <target>` - Remove a subscription\n"
            "`/delthreshold <base> <target>` - Remove an alert\n\n"
            "**Supported Currencies:** USD, GBP, EUR\n\n"
            "**Examples:**\n"
            "`/current USD EUR`\n"
            "`/subscribe USD EUR hourly`\n"
            "`/threshold USD EUR < 0.90`"
        )
        async with s.post(
            f'https://api.telegram.org/bot{settings.bot_token}/sendMessage', 
            json={
                'chat_id': '@durov', 
                'text': help_text, 
                'parse_mode': 'Markdown'
            }
        ) as r:
            print(await r.text())

asyncio.run(main())