Explorar o código

Removed chatbot

TheHamkerCat %!s(int64=5) %!d(string=hai) anos
pai
achega
b944f5345a
Modificáronse 3 ficheiros con 0 adicións e 38 borrados
  1. 0 3
      sample_config.ini
  2. 0 1
      wbb/__init__.py
  3. 0 34
      wbb/modules/chatbot.py

+ 0 - 3
sample_config.ini

@@ -16,9 +16,6 @@ captcha_delay_in_seconds = 300
 #https://github.com/cyberboysumanjay/JioSaavnAPI
 jio_saavn_api = http://127.0.0.1:5000/result/?query=
 
-# Get this for free from https://accounts.intellivoid.net
-lydia_api = e9cb845e6187ee0020e26ab087f3s5d4gas53fg4
-
 
 [prefix]
 prefixes = /

+ 0 - 1
wbb/__init__.py

@@ -41,6 +41,5 @@ Command = config.get("prefix", "prefixes").split()
 MOD_LOAD = config.get("mods", "load_modules").split()
 MOD_NOLOAD = config.get("mods", "noload_modules").split()
 bot_start_time = time.time()
-LYDIA_API = config.get("admin", "lydia_api")
 
 app = Client(":memory:", workers=16)

+ 0 - 34
wbb/modules/chatbot.py

@@ -1,34 +0,0 @@
-import aiohttp
-from pyrogram import filters
-from wbb import app
-from wbb.utils.botinfo import BOT_ID
-
-
-__MODULE__ = 'Chatbot'
-__HELP__ = "Reply To Any Message Of Bot To See This In Action."
-
-
-async def getresp(query):
-    url = f"https://dsghrfgj.herokuapp.com/?query={query}"
-    async with aiohttp.ClientSession() as session:
-        async with session.get(url) as res:
-            res = await res.json()
-            text = res['response']['bot']
-            return text
-
-
-@app.on_message(~filters.edited & filters.reply)
-async def chat_bot(_, message):
-    if not message.reply_to_message.from_user.id == BOT_ID:
-        return
-    if not message.text:
-        query = "Hello"
-    else:
-        query = message.text
-    await app.send_chat_action(message.chat.id, "typing")
-    try:
-        res = await getresp(query)
-    except Exception as e:
-        res = str(e)
-    await message.reply_text(res)
-    await app.send_chat_action(message.chat.id, "cancel")