This project is a Discord bot built using TypeScript and the discord.js library, version 14.15.3.
-
Clone the repository:
git clone https://github.com/J-yriz/discordbot-ts.git cd discordbot-ts
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory and add your Discord bot token:DISCORD_TOKEN=YOUR_TOKEN DISCORD_CLIENT_ID=YOUR_CLIENT_ID DISCORD_CLIENT_SECRET=YOUR_CLIENT_SECRET <!-- Optional if ur config.ts UseGenius false --> GENIUS_TOKEN=YOUR_GENIUS_TOKEN LAVA_IP="127.0.0.1" LAVA_PORT=3000 LAVA_PASS="NOTYOURBUSINESS"
npm run dev
- Compile TS to JS and Running the code.npm run build
- Compile TypeScript to JavaScript.npm run start
- Start the bot using the compiled JavaScript code.
src/
- The main source code for the bot.dist/
- The compiled JavaScript code.