|
@@ -2,7 +2,7 @@
|
|
|
import json
|
|
import json
|
|
|
# import sys
|
|
# import sys
|
|
|
import math
|
|
import math
|
|
|
-from pprint import pprint
|
|
|
|
|
|
|
+# from pprint import pprint
|
|
|
|
|
|
|
|
import arrow
|
|
import arrow
|
|
|
|
|
|
|
@@ -61,7 +61,7 @@ if __name__ == '__main__':
|
|
|
|
|
|
|
|
if minutes_to_go < 20 and minutes_to_go % 5 == 0 and minutes_to_go != 0:
|
|
if minutes_to_go < 20 and minutes_to_go % 5 == 0 and minutes_to_go != 0:
|
|
|
temp_status_json, _ = model.get_json_file(player_id)
|
|
temp_status_json, _ = model.get_json_file(player_id)
|
|
|
- if alert in temp_status_json:
|
|
|
|
|
|
|
+ if 'alert' in temp_status_json:
|
|
|
alerts = old_status['alert']
|
|
alerts = old_status['alert']
|
|
|
else:
|
|
else:
|
|
|
alerts = {'15': False, '10': False, '5': False, '0': False}
|
|
alerts = {'15': False, '10': False, '5': False, '0': False}
|
|
@@ -73,7 +73,8 @@ if __name__ == '__main__':
|
|
|
add_here = ''
|
|
add_here = ''
|
|
|
if 8 < minutes_to_go < 12:
|
|
if 8 < minutes_to_go < 12:
|
|
|
add_here = '@here '
|
|
add_here = '@here '
|
|
|
- alert = add_here + f'Alert: {minutes_to_go} mins to attack [{name_alert} [{id_alert}]]({url_alert}). ' + \
|
|
|
|
|
|
|
+ alert = add_here + \
|
|
|
|
|
+ f'Alert: {minutes_to_go} mins to attack [{name_alert} [{id_alert}]]({url_alert}). ' + \
|
|
|
f'Be there at {attack_time_time}!'
|
|
f'Be there at {attack_time_time}!'
|
|
|
print('Sending alert')
|
|
print('Sending alert')
|
|
|
view.send_alert(alert)
|
|
view.send_alert(alert)
|
|
@@ -86,6 +87,5 @@ if __name__ == '__main__':
|
|
|
write_file.close()
|
|
write_file.close()
|
|
|
write_file.close()
|
|
write_file.close()
|
|
|
|
|
|
|
|
-
|
|
|
|
|
if send_message:
|
|
if send_message:
|
|
|
view.send_message(status)
|
|
view.send_message(status)
|