first commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import asyncio
|
||||
from BITCOIN_RUB import get_location
|
||||
from aiogram import Bot,Dispatcher, executor
|
||||
from config import BOT_TOKEN
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
bitcoin_USD_STR = get_location(url='https://www.rbc.ru/crypto/currency/btcusd')
|
||||
|
||||
|
||||
API_link = "https://api.telegram.org/bot5066611282:AAF-n8L35t-RhjH9kQbvlbucXt_q8wNQcv8"
|
||||
|
||||
updates = requests.get(API_link + "/getUpdates?offset=-1").json()
|
||||
print(updates)
|
||||
|
||||
message = updates["result"][0]["message"]
|
||||
chat_id = message["from"]["id"]
|
||||
text = message["text"]
|
||||
sent_message = requests.get(API_link + f"/sendMessage?chat_id={chat_id}&text=Привет, ты написал{text}")
|
||||
sent_message = requests.get(API_link + f"/sendMessage?chat_id={chat_id}&text=Привет, курс битка{bitcoin_USD_STR}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user