randydev commited on
Commit
d86d5e9
1 Parent(s): 9fafe96

Update chatbot/plugins/chat.py

Browse files
Files changed (1) hide show
  1. chatbot/plugins/chat.py +3 -3
chatbot/plugins/chat.py CHANGED
@@ -76,7 +76,7 @@ Username: `{username}`
76
  async def chatbot_talk(client: Client, message: Message):
77
  genai.configure(api_key=GOOGLE_API_KEY)
78
  if message.photo:
79
- await client.send_chat_action(message.chat.id, enums.ChatAction.TYPING)
80
  await asyncio.sleep(1.5)
81
  file_path = await message.download()
82
  caption = message.caption or "What's this?"
@@ -119,7 +119,7 @@ async def chatbot_talk(client: Client, message: Message):
119
  return await ai_reply.edit_text(f"Error: {e}")
120
 
121
  if message.audio or message.voice:
122
- await client.send_chat_action(message.chat.id, enums.ChatAction.TYPING)
123
  await asyncio.sleep(1.5)
124
  if client.me.is_premium:
125
  ai_reply = await message.reply_text(f"{custom_loading}Processing...")
@@ -187,7 +187,7 @@ async def chatbot_talk(client: Client, message: Message):
187
  return await ai_reply.edit_text(f"Error: {e}")
188
 
189
  if message.video:
190
- await client.send_chat_action(message.chat.id, enums.ChatAction.TYPING)
191
  await asyncio.sleep(1.5)
192
  if client.me.is_premium:
193
  ai_reply = await message.reply_text(f"{custom_loading}Processing...")
 
76
  async def chatbot_talk(client: Client, message: Message):
77
  genai.configure(api_key=GOOGLE_API_KEY)
78
  if message.photo:
79
+ await client.send_chat_action(message.chat.id, enums.ChatAction.UPLOAD_PHOTO)
80
  await asyncio.sleep(1.5)
81
  file_path = await message.download()
82
  caption = message.caption or "What's this?"
 
119
  return await ai_reply.edit_text(f"Error: {e}")
120
 
121
  if message.audio or message.voice:
122
+ await client.send_chat_action(message.chat.id, enums.ChatAction.UPLOAD_AUDIO)
123
  await asyncio.sleep(1.5)
124
  if client.me.is_premium:
125
  ai_reply = await message.reply_text(f"{custom_loading}Processing...")
 
187
  return await ai_reply.edit_text(f"Error: {e}")
188
 
189
  if message.video:
190
+ await client.send_chat_action(message.chat.id, enums.ChatAction.UPLOAD_VIDEO)
191
  await asyncio.sleep(1.5)
192
  if client.me.is_premium:
193
  ai_reply = await message.reply_text(f"{custom_loading}Processing...")