|
@@ -16,13 +16,13 @@ def send_message(status):
|
|
|
status_text = f"[{name} [{its_id}]](https://www.torn.com/profiles.php?XID={its_id}) → " + \
|
|
status_text = f"[{name} [{its_id}]](https://www.torn.com/profiles.php?XID={its_id}) → " + \
|
|
|
"Loot level changed to "+roman.toRoman(status['integer'])
|
|
"Loot level changed to "+roman.toRoman(status['integer'])
|
|
|
status_text += "\n" + status['time_string']
|
|
status_text += "\n" + status['time_string']
|
|
|
- this_json = {'content': status_text}
|
|
|
|
|
|
|
+ this_json = {"content": status_text}
|
|
|
pprint(this_json)
|
|
pprint(this_json)
|
|
|
_send(this_json)
|
|
_send(this_json)
|
|
|
|
|
|
|
|
|
|
|
|
|
def send_alert(this_alert):
|
|
def send_alert(this_alert):
|
|
|
- this_json = {'content': this_alert}
|
|
|
|
|
|
|
+ this_json = {"content": this_alert}
|
|
|
_send(this_json)
|
|
_send(this_json)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -33,7 +33,7 @@ def _send(send_json):
|
|
|
for webhook_key in webhooks:
|
|
for webhook_key in webhooks:
|
|
|
webhook = webhooks[webhook_key]
|
|
webhook = webhooks[webhook_key]
|
|
|
if 'Alert: 10 mins' in send_json['content'] and webhook_key == 'Unrelenting':
|
|
if 'Alert: 10 mins' in send_json['content'] and webhook_key == 'Unrelenting':
|
|
|
- send_json['content'] = '@here ' + send_json['content']
|
|
|
|
|
|
|
+ send_json["content"] = "@here " + send_json['content']
|
|
|
pprint(send_json)
|
|
pprint(send_json)
|
|
|
url = base_url+webhook
|
|
url = base_url+webhook
|
|
|
response = requests.post(url, json=send_json)
|
|
response = requests.post(url, json=send_json)
|