One-Time invite link generator for your Discord server with webpage, which supports Discord AI chatbot powered by OpenAI language model called GPT-3.5.
You can check WEST GAME 卍 Server.
- Self commands for bot owners only to retrieve the logs, and clean the logs.
- Welcome message. Check bot.js line 243.
- Currently, I have no ideas.
- !help: You know what is it for.
- !log: Retrieve the GPT-3.5 logs.
- !clean: Clean all bot logs.
-
Go to the Discord Developer Portal and create a new application.
-
Navigate to the "Bot" tab and click "Add Bot" to create a bot user.
-
Under the "Bot" tab, you'll find the token. Copy this token; .env.
-
Still under the "Bot" tab, set the Authorization Flow and Privileged Gateway Intents to this:
-
Now, go to the "OAuth2" tab, in the "OAuth2 URL Generator" section, select the "bot" scope and as whatever you want.
-
Copy the generated URL and paste it into your browser. This will allow you to invite the bot to your server.
- Visit the OpenAI website and create an account. Follow the registration process to set up your account.
- Navigate to API Section of the OpenAI platform.
- Locate the API key generation section on the OpenAI platform and follow the instructions to generate your key and copy to; .env.
- Fork this repo or clone:
git clone https://github.com/agcrisbp/AD-GPT3
- Install the dependencies:
npm install
- Preview
node bot.js
- Go to your
Server Settings > Widget > Copy JSON API
.
-
Go to script.js and replace "https://discord.com/api/guilds/1198288601696440350/widget.json" with the link you just copied.
-
Edit lines of index.html in
<head>
section with your server data. -
Setup the
.env.example
and rename it to.env
.
Deploy To https://fly.io
-
Install the flyctl package: Install flyctl.
-
Setup fly app:
flyctl auth login
- Launch the app:
flyctl launch
? Would you like to copy its configuration to the new app? Yes
? Do you want to tweak these settings before proceeding? Yes
-
Set the app name based on your
app = "YourAppName"
in fly.toml. -
Deploy:
flyctl deploy
Next time you want to redeploy your web after editing something, just use
flyctl deploy
.
fly.io will run 2 machines automatically, if it makes run your bot into 2 at once, stop & destroy one of them:
flyctl machine stop
- Destroy:
flyctl machine destroy