Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rounding to rank difference and remove unnecessary comment. #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions locations_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ def build_leaderboard(self, chat_id):
if matching_rank_entry == 1:
motivation_text = "\U0001F947 You are my favorite DJ at the moment! \U0001F947 \nThank you for your most appreciated support \U0001F618. \n\n"
else:
difference_to_above = leaderboard[matching_rank_entry -
2]["total_distance"] - entry_to_find["total_distance"]
difference_to_above = round(leaderboard[matching_rank_entry -
2]["total_distance"] - entry_to_find["total_distance"], 2)
motivation_text = "The person a rank above you accompanied me by {}km more than you. Let's close that gap and make YOU my top DJ! \U0001F4BF \n\n".format(
difference_to_above)
if matching_rank_entry > 10:
Expand Down
2 changes: 1 addition & 1 deletion telegram_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(
"p": self.play_pause,
"hm": self.provide_unlistened_songs_details,
}
# "listen": self.start_listening,

for command in ADMIN_COMMAND_MAP:
dispatcher.add_handler(
CommandHandler(
Expand Down