discord.js v14 example bot
This is an example of lavaclient using discord.js v14
Setup
-
- Create an application in the Discord Developer Portal.
-
- Grab the bot token from the "Bot" tab.
-
- Click the
Use this template
button
-
- Install all dependencies:
yarn
or npm install
-
- Setup lavalink
-
- Make sure you have java 11 or above installed.
-
- Grab a jar from the Lavalink Releases Page
-
- Create an application.yml in the same folder as the Lavalink.jar
-
- Start lavalink using:
java -jar Lavalink.jar
-
- Rename
.env.example
to .env
and replace the value of BOT_TOKEN
to the token from step 2
-
- Run the Bot
- production:
yarn start
- development:
yarn dev
or yarn dev --force-sync
if you're modifying application commands (updating, creating, deleting, etc...)