File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ ignore_missing_imports = true
4
4
5
5
[tool .poetry ]
6
6
name = " pyth-observer"
7
- version = " 0.2.3 "
7
+ version = " 0.2.4 "
8
8
description = " Alerts and stuff"
9
9
authors = []
10
10
readme = " README.md"
Original file line number Diff line number Diff line change @@ -128,9 +128,17 @@ async def send(self):
128
128
telegram_api_url = (
129
129
f"https://api.telegram.org/bot{ self .telegram_bot_token } /sendMessage"
130
130
)
131
+
132
+ formatted_message = ""
133
+ for key , value in text .items ():
134
+ value_str = f"{ value :.2f} %" if key == "deviation" else f"{ value } "
135
+ formatted_message += (
136
+ f"*{ key .capitalize ().replace ('_' , ' ' )} :* { value_str } \n "
137
+ )
138
+
131
139
message_data = {
132
140
"chat_id" : chat_id ,
133
- "text" : text ,
141
+ "text" : formatted_message ,
134
142
"parse_mode" : "Markdown" ,
135
143
}
136
144
You can’t perform that action at this time.
0 commit comments