Hosting Discord Bot from Replit
Successfully host a Discord Bot server connected with Convai API from Replit
Here are the steps listed to run the discord bot server from Replit successfully
Steps:
Sign up to Replit, then visit the link mentioned above to get to the published Repl.
Once you are on the page, click on Fork Repl.
Click on Fork Repl again from the pop-up notification.
This will create a fork of the code in your account. Once it has been forked successfully, it will open the code in the editor for you.
Go over to Secrets in the bottom left corner of the screen.
Now Add the following credentials. Copy the Keys directly from here to avoid any typos.
Convai API Key Details:
Convai Character ID:
Allowed Channels:
Discord Bot Details:
Note: ALLOWED_CHANNELS restricts the bot to respond to only the channels mentioned in the list. This affects all the servers the bot has been invited to. For new server additions, you need to add the new list of allowed channels to the list. This might also require you to re-run the Repl.
After you have entered the details, it should look something like this
Then click on the Run button at the top to start the bot. Once you have the log, saying the bot has started, you are all done.
Last updated