mirror of
https://gitlab.com/0xDEAD10CC/pycoindroid
synced 2025-07-05 12:35:38 -07:00
add alert for mabuhay
This commit is contained in:
parent
310b1ae5e4
commit
586014ffe4
1 changed files with 11 additions and 0 deletions
11
src/Event.py
11
src/Event.py
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue