#Bot on replit

1 messages · Page 1 of 1 (latest)

vast horizon
#

you can change the ip of ipc_client in the webapp.py

vast horizon
#

and you also have to change the host and port in settings.json

neat laurel
#

i got some ips on replit

#

but i can't access it

#

which port should I use on the replit?

vast horizon
vast horizon
#

when you start your dashboard or the bot a webview will pop up and there should be a url like https://81b56.....2k.replit.dev/

neat laurel
#

when i put repl url i got error

vast horizon
#

Where do you put the repl url ?

neat laurel
vast horizon
#

You should pass the url ipc client

#

Not starting the flask server with a url

neat laurel
#

ok, lets start again

#

when i import project

#

i need to change ipc in settings.json

#

thats it?

vast horizon
#

actally im not sure how to host it on repl.it i never tried

#

but if you want to connect your dashboard to your bot. you have to pass a host and port into ipc_client because by default the ipc_client will connect to 127.0.0.1

#

to pass the host and port into ipc_client you have to change the code in webapp.py (line 102) ipc_client = IPCClient(host="81b6..f.replit.dev", port=443, secret_key=app.secret_key, callback=message_handler)

neat laurel
#

when i put repl url

#

i got this

#

python ./web/webapp.py

  • Serving Flask app 'webapp'
  • Debug mode: off
    Cannot assign requested address
vast horizon
#

you have to set the flask host in 0.0.0.0

neat laurel
#

ok, with 443 port or 5000?

#

i think 433 or 80

#

is open on repl

vast horizon
#

443 i think

neat laurel
#

python ./web/webapp.py

  • Serving Flask app 'webapp'
  • Debug mode: off
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:443
  • Running on http://172.31.196.37:443
    Press CTRL+C to quit
#

ok now i got some ip adress

#

but

#

this is on my repl url

vast horizon
# neat laurel

these are not public ip for repl ofc you are not able to access

#

and if you will to run on port 443 you must use https instead of http

neat laurel
#

whats the solution

vast horizon
#

umm it works for me

#

you should get the link that repl provided

neat laurel
#

how 😦

vast horizon
#

how you start the dashboard?

#

when you started the dashboard on repl.it there should be a webview poping up

#

and then you press on the new tab button in the webview

neat laurel
#

can you send me your settings.json

ipc_server host and port

#

and 23 line

vast horizon
#

it doesn't required settings.json

#

socketio.run(app, host="0.0.0.0", port=5000) (line 229)

#

for the REDIRECT_URI you should have your own repl.it public url

neat laurel
#

i take Reserved VM

#

i will start again hahah

vast horizon
#

i just use the default settings on repl.it

#

but i will suggestion you to get a real vm instead of using replit

#

because replit is not stable and not for hosting discord bot

neat laurel
#

where i can host my bot?

#

you have some idea?

#

Heroku?

vast horizon
#

you can get a vps

#

heroku also not for hosting bot

#

you can search for vps on google and you will see a lot

neat laurel
#

ok, thanks