Web view is not dislaying for me even if I search it up it does not display it and i need to because in the tutorial for the discord bot i need the link to give it to a hoster to keep it up 24/7
Hey there! Could you send a screen shot? Could you also move this to replit help seeing as you donât need help with your code.
Hey @elevatorexplore! Welcome to the community!
You will need to create a website to be hosted by your Repl. Then you will be able to use the URL provided to allow the Repl to be awake.
You can also use Replitâs Always On feature to keep your Repl on.
Could you send a link to your repl?
If youâre trying to make a discord bot then youâre likely not making any output, hence why no webview is displayed. The bot will be on while itâs running, and you can buy powerups to make it run infinitely.
Hope this helps!
Hey there @elevatorexplore! Welcome to the community, you are not able to view WebView because you are not declaring the app host, to do this, place this package in your index.js file at the top of the page:
const express = require("express"); const app = express(); const port = 3000;
Then at the bottom of the page, since you are hosting a discord bot, place this code at the bottom of the page (but above the client.login("...");
line):
`app.get(â/â, (req, res) => {
res.send(âHello world!â);
});
app.listen(port, () => {
console.log(âserver onlineâ);
});`
This is the default format for most cases of hosting bots online 24/7, but some bots may have a custom dashboard already set up, so this isnât really required, an example of a bot using a custom dashboard is Pogy, which has a specialized dashboard.js file, changes are not needed for this particular bot, but for the bot youâre hosting, these changes are needed to host WebView.