From 5bf96efcd70d784294f3325b98376707562297a5 Mon Sep 17 00:00:00 2001 From: Kim Hyun-Jinn Date: Thu, 7 Dec 2017 23:43:00 +0900 Subject: [PATCH 1/3] Update SiteAlert_bot.py Must use ReplyKeyboardRemove. Official bot api removed ReplyKeyboardHide at November 21, 2016 update. --- SiteAlert_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SiteAlert_bot.py b/SiteAlert_bot.py index 9c8a4c1..823cbb4 100755 --- a/SiteAlert_bot.py +++ b/SiteAlert_bot.py @@ -10,7 +10,7 @@ site_alert = SiteAlert() leng = "" Array = {} -gen_markup = types.ReplyKeyboardHide(selective=False) +gen_markup = types.ReplyKeyboardRemove(selective=False) wlcm_msg = "!\nWelcome to @SiteAlert_bot.\nCommands available:\n/ping - Pong\n/show - Print the list of saved sites\n/check - Check new website\n/addme - Notify me on an already registered site\n/removeme - Reverse action\n/register - Register your email\n/registered - Check if you are alredy registered, and show your subscribed sites\n/unregister - Delete your registration\n/link - Print the link associated to a website\n/mailoff - Disable mail notification\n/mailon - Reverse action\n/telegramoff - Disable telegram notification\n/telegramon - Reverse action\n/help - Print help message" tb = telebot.TeleBot(TOKEN) From e3372b511fde257e0f98460b409380db8f40964a Mon Sep 17 00:00:00 2001 From: Kim Hyun-Jinn Date: Fri, 8 Dec 2017 02:23:49 +0900 Subject: [PATCH 2/3] tuple error patch tuple is not supported to insert (at least in this way) into a text field --- SiteAlert_bot.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SiteAlert_bot.py b/SiteAlert_bot.py index 823cbb4..130e24b 100755 --- a/SiteAlert_bot.py +++ b/SiteAlert_bot.py @@ -144,13 +144,12 @@ def registered(m): credentials = site_alert.execute_fetch_all("SELECT mail FROM Users WHERE telegram =?", (m.chat.id,)) if len(credentials) > 0: mymsg = "You have registered this e-mail: " + credentials[0] + "\nYour notification status is:\nE-mail: " - status = site_alert.execute_fetch_all("SELECT mailnotification FROM Users WHERE mail = ?", (credentials[0],))[ - 0] + status = site_alert.execute_fetch_all("SELECT mailnotification FROM Users WHERE mail = ?", (credentials[0]))[0] mymsg += status[0] + "\nTelegram: " status = \ - site_alert.execute_fetch_all("SELECT telegramnotification FROM Users WHERE mail = ?", (credentials[0],))[0] + site_alert.execute_fetch_all("SELECT telegramnotification FROM Users WHERE mail = ?", (credentials[0]))[0] mymsg += status[0] + "\nYou are registered to:" - for site in site_alert.execute_fetch_all("SELECT name FROM Registered WHERE mail = ?", (credentials[0],)): + for site in site_alert.execute_fetch_all("SELECT name FROM Registered WHERE mail = ?", (credentials[0])): mymsg = mymsg + "\n" + str(i) + ") " + site[0] i += 1 tb.send_message(m.chat.id, mymsg) From a42041bf3355f1ee854bf7c8675d0594df1816c0 Mon Sep 17 00:00:00 2001 From: Albertus Craddle <36672902+AlbertusCraddle@users.noreply.github.com> Date: Wed, 21 Feb 2018 15:34:19 +0100 Subject: [PATCH 3/3] Fix Typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6bf1401..a4c9e96 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Speak with the official bot, [@SiteAlert_bot][4]! ------------------------ -###License: +### License: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -100,4 +100,4 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [1]: http://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-beautiful-soup [2]: https://github.com/eternnoir/pyTelegramBotAPI/ [3]: https://github.com/ilteoood/SiteAlert-Python/blob/master/SiteAlert_bot.py -[4]: https://telegram.me/SiteAlert_bot \ No newline at end of file +[4]: https://telegram.me/SiteAlert_bot