Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from flask import Flask
import asyncio
from aiohttp import web

app = Flask(__name__)

@app.route('/')
def thecrazybossisback():
return 'Crazybossss'

async def run_app():
runner = web.AppRunner(app)
await runner.setup()
site = web.TCPSite(runner, 'localhost', 5000)
await site.start()

if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(run_app())
loop.run_forever()
11 changes: 1 addition & 10 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@
from pyrogram import types
from Script import script


from plugins.webcode import bot_run
from os import environ
from aiohttp import web as webserver

PORT_CODE = environ.get("PORT", "8080")



Expand Down Expand Up @@ -57,12 +53,7 @@ async def start(self):
await self.send_message(chat_id=LOG_CHANNEL, text=script.RESTART_TXT)#RESTART SND IN LOG_CHANNEL
print("Goutham SER own Bot</>")

client = webserver.AppRunner(await bot_run())
await client.setup()
bind_address = "0.0.0.0"
await webserver.TCPSite(client, bind_address,
PORT_CODE).start()





Expand Down
12 changes: 0 additions & 12 deletions plugins/webcode.py

This file was deleted.

3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ marshmallow==3.18.0
umongo==3.1.0
requests
bs4
imdbpy==2021.4.18
aiohttp==3.8.3
Flask
gunicorn