From 927e0bb68c363e56fda065c8b521014563ea5f6a Mon Sep 17 00:00:00 2001 From: Tuomi Jan-Sebastian Date: Thu, 14 Jul 2016 15:20:18 +0300 Subject: Add telepot dependency --- radiodiodibot.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 radiodiodibot.py 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() -- cgit v1.3