aboutsummaryrefslogtreecommitdiffstats
path: root/radiodiodibot.py
diff options
context:
space:
mode:
authorTuomi Jan-Sebastian <tuomij5@kosh.org.aalto.fi>2016-07-14 15:20:18 +0300
committerTuomi Jan-Sebastian <tuomij5@kosh.org.aalto.fi>2016-07-14 15:20:18 +0300
commit927e0bb68c363e56fda065c8b521014563ea5f6a (patch)
tree3c7e943db5a8e7e6250cbccb4ac36fc5456509a2 /radiodiodibot.py
parente63608c44e4ea0af5a7a66cec59ad65a56e168c4 (diff)
Add telepot dependency
Diffstat (limited to 'radiodiodibot.py')
-rw-r--r--radiodiodibot.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/radiodiodibot.py b/radiodiodibot.py
new file mode 100644
index 0000000..00d382a
--- /dev/null
+++ b/radiodiodibot.py
@@ -0,0 +1,23 @@
+#!/usr/env python
+
+import sys
+
+def get_token_from_argv():
+ try:
+ return argv[1]
+ except:
+ print("Please provide the telegram bot token as a command line argument.")
+ sys.exit()
+
+def main():
+ try:
+ import telepot
+ except:
+ print("radiodiodibot needs the telepot module to communicate with Telegram.")
+ print("Please install telepot before using radiodiodibot.")
+ return
+
+ token = get_token_from_argv()
+
+if __name__ == "__main__":
+ main()