From 75cf814d9adeb55b1e79eb8b6c8cf915ed553821 Mon Sep 17 00:00:00 2001 From: Matthew DaDamio Date: Tue, 28 Jan 2020 13:08:11 -0800 Subject: [PATCH] baseline for new feature --- README.md | 1 + app.py | 5 ++++- modules/ndcalifornia.py | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 modules/ndcalifornia.py diff --git a/README.md b/README.md index 23bb2d5..4a9de6f 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ - !roseceremony - retrieve the list of current bachelor contestants - !train \ \ - Lets you know when the next train/bus for at is coming - !weather \ - Lets you know the weather at redwood, att or menlo +- !instagram - get the NDCalifornia instagram story URL - shortstop keeps track of the calendar and will wish you a happy birthday! diff --git a/app.py b/app.py index 405180f..6ead8ad 100755 --- a/app.py +++ b/app.py @@ -19,6 +19,7 @@ from modules.daily_cal import daily_cal from modules.door import door from modules.usage import usage +from modules.ndcalifornia import instagram_handler # Globs @@ -45,7 +46,9 @@ def call_handler(sender, message, bot_id, app_id): '!dierre': dierre_pic_handler, '!roseceremony': bachelor, '!bachelor': bachelor, - '!calendar': daily_cal + '!calendar': daily_cal, + '!instagram': instagram_handler, + '!ndcalifornia': instagram_handler } # Get the function from handlers dictionary, add message as argument, return None on KeyError diff --git a/modules/ndcalifornia.py b/modules/ndcalifornia.py new file mode 100644 index 0000000..8647cd3 --- /dev/null +++ b/modules/ndcalifornia.py @@ -0,0 +1,5 @@ +def instagram_handler(sender, message, bot_id, app_id): + """Return NDCalifornia instagram story""" + if '!ndcalifornia' in message or '!instagram' in message: + return "https://www.instagram.com/stories/notredamecalifornia" + return None \ No newline at end of file