fixing missing parameters, message f-string and elif condition for days reward
This commit is contained in:
parent
8a1a4b8039
commit
dd57bc4bc9
@ -128,11 +128,11 @@ def send_patch_message_to_stoat(top15_weekly_activity_ze, oldest_timestamp):
|
||||
print(response.status_code, " ", response.text)
|
||||
sys.exit(1)
|
||||
|
||||
def send_final_stoat_edit(players_vip_status):
|
||||
message = "Finished Time Tracking from **{oldest_timestamp}** until **{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}** for Zombie Escape Players. The final results of the week are:\n\n"
|
||||
def send_final_stoat_edit(players_vip_status, oldest_timestamp):
|
||||
message = f"Finished Time Tracking from **{oldest_timestamp}** until **{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}** for Zombie Escape Players. The final results of the week are:\n\n"
|
||||
for index, player_vip_status in enumerate(players_vip_status):
|
||||
steamid, name, hours_server, minutes_server, reward_status, days_rewarded = player_vip_status
|
||||
message += f"{index + 1}: {name} ({steam_id}) Playtime: {hours_server} hours and {minutes_server} minutes. {reward_status} Reward was {days_rewarded} days.\n\n"
|
||||
message += f"{index + 1}: {name} ({steamid}) Playtime: {hours_server} hours and {minutes_server} minutes. {reward_status} Reward was {days_rewarded} days.\n\n"
|
||||
|
||||
headers = {
|
||||
"x-bot-token": f"{stoat_token}",
|
||||
@ -185,10 +185,10 @@ def give_vip_rewards(top15_weekly_activity_ze):
|
||||
|
||||
if index < 5:
|
||||
days_rewarded = 7
|
||||
if index < 10:
|
||||
elif index < 10:
|
||||
days_rewarded = 5
|
||||
elif index < 15:
|
||||
days_rewarded = 3
|
||||
if index < 15:
|
||||
days_rewarded = 1
|
||||
steam_community_id = steamid_to_commid(steamid)
|
||||
|
||||
print(f'index: {index}. steamid: {steamid}. name: {name}. days_rewarded: {days_rewarded}')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user