- Discord.js guide - read through the "HOME", "INSTALLATIONS & PREPARATIONS", and "CREATING YOUR BOT" sections, which cover project structure in Node.js and how to build a slash command for your bot.
- Discord developer portal - this is where you access your applications and bot users.
npm install
to install dependencies- Rename
example.env
to.env
and input the keys and ids. Ask the owner of this repository for help if needed. IMPORTANT: The.env
file must never be committed as it contains secrets and keys. - You may test bot functionality in your own private server. In this case, the
GUILD_ID
environment variable should be set your private server's ID. npm run start
to start the bot.
/ping
- The bot replies with "Pong!". Just a simple example to show how to build a slash command./ask [question]
- Ask a question related to coding/programming. The bot sends the question to OpenAI's API to generate an AI response. The response is generated using thegpt-3.5-turbo
model.