\shares working now and also sensing with daily update. Daily update message prettier

This commit is contained in:
Florian Kellermann
2022-05-10 16:43:17 +02:00
parent 00eeb1c924
commit 7eaddabadc
3 changed files with 32 additions and 13 deletions

View File

@@ -587,11 +587,12 @@ def send_shares(message):
if shares == None: # true if user does not exist
bot.send_message(chat_id=user_id, text='This didn\'t work. Make sure to connect your telegram id (/id) on https://gruppe1.testsites.info')
if not shares: # true if user has no shares
elif not shares: # true if user has no shares
bot.send_message(chat_id=user_id, text='You do not have any shares. Add shares on https://gruppe1.testsites.info')
else:
for element in shares:
bot.send_message(chat_id=user_id, text=share_fetcher.get_share_information_simple(element))
# tbd (flo)
@bot.message_handler(commands=['setinterval', 'Setinterval'])