Skip to content

Commit 4a793c6

Browse files
authored
Update handlers.py
1 parent 66c65a4 commit 4a793c6

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

Diff for: gemini_pro_bot/handlers.py

-27
Original file line numberDiff line numberDiff line change
@@ -87,32 +87,6 @@ async def newchat_command(update: Update, context: ContextTypes.DEFAULT_TYPE) ->
8787
await init_msg.edit_text("New chat session started.")
8888

8989

90-
91-
async def help_command(update: Update, _: ContextTypes.DEFAULT_TYPE) -> None:
92-
"""Send a message when the command /help is issued."""
93-
help_text = """
94-
Basic commands:
95-
/start - Start the bot
96-
/help - Get help. Shows this message
97-
98-
Chat commands:
99-
/new - Start a new chat session (model will forget previously generated messages)
100-
101-
Send a message to the bot to generate a response.
102-
"""
103-
await update.message.reply_text(help_text)
104-
105-
106-
async def newchat_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
107-
"""Start a new chat session."""
108-
init_msg = await update.message.reply_text(
109-
text="Starting new chat session...",
110-
reply_to_message_id=update.message.message_id,
111-
)
112-
new_chat(context)
113-
await init_msg.edit_text("New chat session started.")
114-
115-
11690
# Define the function that will handle incoming messages
11791
async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
11892
"""Handles incoming text messages from users.
@@ -252,4 +226,3 @@ async def handle_image(update: Update, _: ContextTypes.DEFAULT_TYPE) -> None:
252226
reply_to_message_id=init_msg.message_id,
253227
disable_web_page_preview=True,
254228
)
255-
await asyncio.sleep(0.1)

0 commit comments

Comments
 (0)