Follow this step-by-step guide to get your chat bot up and running
Make sure you have everything you need before starting
Verify that you have Node.js, npm, Git, and a Twitch account set up on your system.
$ node -v
$ npm -v
$ git --version
Node.js not found? Download from nodejs.org (LTS version recommended)
npm not found? npm comes with Node.js. If missing, reinstall Node.js.
Git not found? Install from git-scm.com
Clone the repository from GitLab
Clone the ArcRaids repository to your local machine using Git.
$ git clone REPO_URL
$ cd arcraids
Permission denied? Make sure you have Git installed and access to the repository.
Repository not found? Verify the URL is correct and you have access permissions.
Install all required npm packages
Install all project dependencies using npm. This may take a few minutes.
$ npm install
Installation fails? Make sure you're using Node.js 18+ and try deleting node_modules and package-lock.json, then run npm install again.
Permission errors? Avoid using sudo with npm. Use a Node version manager like nvm instead.
Set up your environment variables
Create a .env file from the example template and fill in your Twitch credentials.
$ cp .env.example .env
.env.example not found? Check the repository structure. The file should be in the project root.
Token format? OAuth tokens should start with oauth: prefix.
Set up your Twitch Developer application
Create a Twitch Developer application and generate an OAuth token with the required scopes.
chat:read
Read chat messages
chat:edit
Send chat messages
http://localhost)chat:read and chat:editoauth:)Token invalid? Make sure it starts with oauth: and includes both required scopes.
Can't generate token? Use twitchtokengenerator.com or the official Twitch CLI tool.
Bot account? The token must be generated for your bot account, not your broadcaster account.
Start the bot and verify it's working
Start the bot in development mode and verify it connects to Twitch successfully.
$ npm run dev
Connected to Twitch IRC at irc.chat.twitch.tv:6697
Raid scheduler started
Server running on port 3000
Connection failed? Check your OAuth token is valid and has the correct scopes.
Port already in use? Change the PORT in your .env file to a different port.
Database errors? Make sure the DB_PATH directory exists and is writable.
Invite the bot and test commands
Invite the bot to your channel (if needed) and verify it responds to commands in chat.
In your Twitch chat, try these commands:
!create MyCallsign
Creates your character profile
!profile
Shows your profile
Bot not responding? Check that the bot account is not banned and has permission to chat.
Commands not working? Verify the bot is connected and the channel name in .env matches your channel.
Optional: Run the bot continuously
Deploy the bot to a hosting service so it runs 24/7 without keeping your computer on.
$ docker build -t arcraids .
$ docker run --env-file .env -p 3000:3000 arcraids
Note: Make sure Docker is installed and your .env file is in the project root.
npm installnpm startGET /health.env file to Git.
Always use the hosting service's environment variable settings.
Docker build fails? Make sure you have a Dockerfile in the project root.
Hosting service issues? Check that all environment variables are set correctly in the dashboard.
Bot not connecting? Verify your OAuth token is still valid and hasn't expired.
Final checks to ensure everything works
Run through a final checklist to verify all bot features are working correctly.
Raids not starting? Check the bot logs for scheduler errors. Verify the time is correct on your server.
Inventory not saving? Check database permissions and that DB_PATH is writable.
Extension not loading? Verify EXTENSION_SECRET and EXTENSION_CLIENT_ID are correct in .env.