Skip to content

Commit 3d78a2e

Browse files
authored
replace /find command to /f
1 parent 896ad59 commit 3d78a2e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bot.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async def find(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
1919
links_column = headers.get('Link')
2020
tencode_column = headers.get('Ten-code')
2121
name_column = headers.get('Name')
22-
parsed_message = update.message.text.replace("/find", "").strip()
22+
parsed_message = update.message.text.replace("/f", "").strip()
2323
response_message = ''
2424

2525
if any(char.isdigit() for char in parsed_message):
@@ -38,7 +38,7 @@ async def find(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
3838
response_message += f"{row[name_column - 1].value} : {row[links_column - 1].value}"
3939

4040
if response_message == '':
41-
response_message += "Not Found"
41+
response_message += "Not Found
4242

4343
logging.info("Successfull send message to Telegram Bot!")
4444

@@ -56,7 +56,6 @@ def main():
5656
"""Main function"""
5757
try:
5858
app = ApplicationBuilder().token(TELEGRAM_BOT_TOKEN).build()
59-
app.add_handler(CommandHandler("find", find))
6059
app.add_handler(CommandHandler("f", find))
6160
app.run_polling()
6261
except Exception as err:

0 commit comments

Comments
 (0)