fixed /start
This commit is contained in:
parent
0f4d4e5624
commit
7785fd6368
@ -80,14 +80,6 @@ def send_start(message):
|
||||
|
||||
:rtype: none
|
||||
"""
|
||||
new_user = User(int(message.from_user.id), message.from_user.first_name, int(message.chat.id)) # now Database driven CHANGE
|
||||
existing_already = False
|
||||
for known_user in user_list:
|
||||
if known_user.user_id == new_user.user_id:
|
||||
existing_already = True
|
||||
if existing_already == False:
|
||||
user_list.append(new_user)
|
||||
|
||||
bot.reply_to(message, "Welcome to this share bot project. Type /help to get information on what this bot can do")
|
||||
|
||||
|
||||
@ -330,7 +322,7 @@ def send_news(message):
|
||||
|
||||
if not top_news: # true if no news found for keyword (empty list)
|
||||
bot.send_message(chat_id=user_id, text=f'No news found for keyword: *{keyword}*', parse_mode="MARKDOWN")
|
||||
|
||||
|
||||
else:
|
||||
formatted_article = news.format_article(top_news[0]) # only format and send most popular news
|
||||
bot.send_message(chat_id=user_id, text=f"_keyword: {keyword}_\n\n" + formatted_article, parse_mode="MARKDOWN")
|
||||
|
Loading…
Reference in New Issue
Block a user