11from pyrogram import Client , filters , idle
22from pyrogram .types import *
33from pymongo import MongoClient
4+ from pyrogram import enums
45import requests
56import random
67import os
@@ -152,7 +153,7 @@ async def vai(client: Client, message: Message):
152153 v = vdb ["vDb" ]["v" ]
153154 is_v = v .find_one ({"chat_id" : message .chat .id })
154155 if not is_v :
155- await bot .send_chat_action (message .chat .id , "typing" )
156+ await bot .send_chat_action (message .chat .id , enums . ChatAction . TYPING )
156157 K = []
157158 is_chat = chatai .find ({"word" : message .text })
158159 k = chatai .find_one ({"word" : message .text })
@@ -175,7 +176,7 @@ async def vai(client: Client, message: Message):
175176 bot_id = getme .id
176177 if message .reply_to_message .from_user .id == bot_id :
177178 if not is_v :
178- await bot .send_chat_action (message .chat .id , "typing" )
179+ await bot .send_chat_action (message .chat .id , enums . ChatAction . TYPING )
179180 K = []
180181 is_chat = chatai .find ({"word" : message .text })
181182 k = chatai .find_one ({"word" : message .text })
@@ -218,7 +219,7 @@ async def vstickerai(client: Client, message: Message):
218219 v = vdb ["vDb" ]["v" ]
219220 is_v = v .find_one ({"chat_id" : message .chat .id })
220221 if not is_v :
221- await bot .send_chat_action (message .chat .id , "typing" )
222+ await bot .send_chat_action (message .chat .id , enums . ChatAction . TYPING )
222223 K = []
223224 is_chat = chatai .find ({"word" : message .sticker .file_unique_id })
224225 k = chatai .find_one ({"word" : message .text })
@@ -241,7 +242,7 @@ async def vstickerai(client: Client, message: Message):
241242 bot_id = getme .id
242243 if message .reply_to_message .from_user .id == bot_id :
243244 if not is_v :
244- await bot .send_chat_action (message .chat .id , "typing" )
245+ await bot .send_chat_action (message .chat .id , enums . ChatAction . TYPING )
245246 K = []
246247 is_chat = chatai .find ({"word" : message .text })
247248 k = chatai .find_one ({"word" : message .text })
@@ -280,7 +281,7 @@ async def vprivate(client: Client, message: Message):
280281 chatdb = MongoClient (MONGO_URL )
281282 chatai = chatdb ["Word" ]["WordDb" ]
282283 if not message .reply_to_message :
283- await bot .send_chat_action (message .chat .id , "typing" )
284+ await bot .send_chat_action (message .chat .id , enums . ChatAction . TYPING )
284285 K = []
285286 is_chat = chatai .find ({"word" : message .text })
286287 for x in is_chat :
@@ -296,7 +297,7 @@ async def vprivate(client: Client, message: Message):
296297 getme = await bot .get_me ()
297298 bot_id = getme .id
298299 if message .reply_to_message .from_user .id == bot_id :
299- await bot .send_chat_action (message .chat .id , "typing" )
300+ await bot .send_chat_action (message .chat .id , enums . ChatAction . TYPING )
300301 K = []
301302 is_chat = chatai .find ({"word" : message .text })
302303 for x in is_chat :
@@ -323,7 +324,7 @@ async def vprivatesticker(client: Client, message: Message):
323324 chatdb = MongoClient (MONGO_URL )
324325 chatai = chatdb ["Word" ]["WordDb" ]
325326 if not message .reply_to_message :
326- await bot .send_chat_action (message .chat .id , "typing" )
327+ await bot .send_chat_action (message .chat .id , enums . ChatAction . TYPING )
327328 K = []
328329 is_chat = chatai .find ({"word" : message .sticker .file_unique_id })
329330 for x in is_chat :
@@ -339,7 +340,7 @@ async def vprivatesticker(client: Client, message: Message):
339340 getme = await bot .get_me ()
340341 bot_id = getme .id
341342 if message .reply_to_message .from_user .id == bot_id :
342- await bot .send_chat_action (message .chat .id , "typing" )
343+ await bot .send_chat_action (message .chat .id , enums . ChatAction . TYPING )
343344 K = []
344345 is_chat = chatai .find ({"word" : message .sticker .file_unique_id })
345346 for x in is_chat :
0 commit comments