0.0.7 fixes and graph

This commit is contained in:
2023-04-22 04:21:24 +03:00
parent cbe9db4932
commit 297445fd50
8 changed files with 140 additions and 21 deletions

View File

@@ -85,4 +85,13 @@ def approve_chat_join_request(chat_id, user_id):
url = apiBase + f"approveChatJoinRequest?chat_id={chat_id}" + \
f'&user_id={user_id}'
r = requests.post(url)
return r
return r
def send_graph(png_data, chat_id):
url = apiBase + f"sendPhoto"
headers = {"Content-Type": "multipart/form-data"}
files = {"photo": ("chart.png", png_data)}
params = {"chat_id": chat_id}
response = requests.post(url, headers=headers, files=files, params=params)
return response.json()