Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 812 Bytes

File metadata and controls

43 lines (35 loc) · 812 Bytes

Discord Bot

A Discord bot powered by discord.js and TypeScript.

Setup

  1. Clone this repository
  2. Install dependencies:
    npm install
  3. Create a .env file in the root directory with your bot token and client ID:
    DISCORD_TOKEN=your_bot_token_here
    CLIENT_ID=your_client_id_here
    
  4. Build the TypeScript code:
    npm run build
  5. Register the bot slash commands:
    npm run register-bot
    npm run register-commands
  6. Start the bot:
    npm start

For development with auto-restart:

npm dev

Local development

Run cloudflared in a terminal and add he tunnel url to Url mapping in discord developer console

docker run cloudflare/cloudflared:latest tunnel --url http://localhost:3000