Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bits_tg_bot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Fred
bits_tg_bot
Commits
02cdab5f
Commit
02cdab5f
authored
Oct 16, 2020
by
Fred
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add emojis to the status message 🥺🥺🥺
parent
349923d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
main.py
main.py
+6
-1
No files found.
main.py
View file @
02cdab5f
...
...
@@ -14,7 +14,12 @@ bot = Bot(TOKEN)
def
bits_handler
(
text
):
msg
=
json
.
loads
(
text
)
try
:
bot
.
edit_message_text
(
"POuL HQ is now {}"
.
format
(
msg
[
"status"
][
"value"
]),
CHAT_ID
,
MESSAGE_ID
)
status
=
msg
[
"status"
][
"value"
]
emoji
=
"🔴🔴"
if
"open"
in
status
:
emoji
=
"🟢🟢"
bot
.
edit_message_text
(
"{emoji} POuL HQ is now {message} {emoji}"
.
format
(
emoji
=
emoji
,
message
=
status
),
CHAT_ID
,
MESSAGE_ID
)
except
:
pass
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment