add alert for mabuhay

This commit is contained in:
0xDEAD10CC 2017-07-25 10:29:02 -07:00
parent 310b1ae5e4
commit 586014ffe4

View file

@ -69,6 +69,17 @@ class EventTask(CoindroidAPITask):
)
except:
self.logger.exception("Unable to send SMS!!")
if (event["target"].get("name") == "Mabuhay") or (event["target"].get("id") == 165):
self.logger.debug("TEMP - Mabuhay's got an action!!! sending sms!!")
try:
self.twilioClient.messages.create(
to="+14086342295",
from_="+14159037708",
body="At block_height {}, action_id {} - {}({}):{}({}) did {} on {}({})".format(
*message_args)
)
except:
self.logger.exception("Unable to send SMS!!")
else:
self.logger.warning("Event has no target!")
message_args.extend([None, None])