This guide will help you get started with local development.
In this guide, you will start a local server instance of Ava, create a Discord test bot, lastly, test Ava commands through the test bot in a test channel.
- Node.js v16 or greater
- Discord account
- A Discord channel
- Docker
Follow the steps in this tutorial to create an Ava test bot.
Once you have the bot created. Go to the Oauth section and assign permissions to the test bot.
Ava needs the following permissions Oauth scopes.
The bot also needs the following permissions.
To invite Ava to a Discord test channel, use the generated URL. Add the generated URL to your browser search bar and visit the URL.
The next page will take you to the bot channel invite page. Go ahead and select your Discord channel of where you want to test the bot.
The bot token can be found on your test application's bot page. You will need the token value for the next step.
There are two methods for starting Ava locally. You can use Docker or run it as a node.js process.
This project creates a Docker image that contains the application logic to run Ava locally. Issue the command below to spin up a docker container running Ava.
NOTE: Ensure you provide a Discord token.
docker run -e AVA_DISCORD_TOKEN="<token>" circa10a/ava
You should see a message when the server is up and running.
docker run -e AVA_DISCORD_TOKEN=$AVA_DISCORD_TOKEN circa10a/ava
> ava@1.0.0 start
> node ./index.js
[INFO] Ready!
Ava can run locally as a node.js process. To start Ava as a node.js process, issue the command into your terminal. You may have to issue npm install
prior to starting the server if you have not done so prior.
NOTE: The command must be issued in the project root.
npm run start
You should see a message when the server is up and running.
> ava@1.0.0 start
> node ./index.js
[INFO] Ready!
Go vist your Discord test channel to verify the test bot is operational.
Go ahead and issue the ava list
command in the channel. If everything is working correctly, you should see a reply containing all the available Ava commands.
If Ava returned all the commands then congratulations. You now have a local test server, and an ava test bot to verify new commands.