Files
PHP_Bot-ModInterface/INSTALL.md
Thomas 76249de494 Update INSTALL.md
adress
2025-10-05 22:58:07 +02:00

2.5 KiB
Raw Blame History

Installationsvejledning Twitch PHP Bot

1 Download

Klon eller hent ZIP fra GitHub:

git clone [https://github.com/tuxitheone/PHP_Bot-ModInterface.git]
Placer i din webserver, fx:

makefile
C:\xampp\htdocs\bot\

2 Krav PHP 8.1+

Aktiverede extensions: pdo_sqlite curl mbstring json Tjek i php.ini at disse ikke er udkommenteret.

3 Konfiguration Opret filen .env i projektets rod:

.env

TWITCH_CHANNEL=ditkanalnavn
TWITCH_OAUTH=oauth:xxxxxxxxxxxxxxxxxxxx
TWITCH_CLIENT_ID=din_client_id
TWITCH_CLIENT_SECRET=din_client_secret
Hent OAuth-token her: https://twitchapps.com/tmi/

4 Database & Admin Gå til http://localhost/bot/web/migrate_users.php → sikrer korrekte kolonner Gå til http://localhost/bot/web/create_admin.php → opretter admin

Login: Brugernavn: admin Adgangskode: demo

5 Start botten Åbn http://localhost/bot/web/login.php

Log ind og klik Start Botten kører i PHP bag kulissen og svarer på chat-kommandoer.

6 (Valgfrit) Live-log via WebSocket Installer Node.js → kør:

npm install ws
node ws_server.js

Dashboardet skifter automatisk til WebSocket, hvis tilgængelig.


#English Installation Guide Twitch PHP Bot

##1 Download

Clone or download the ZIP from GitHub:

git clone [https://github.com/tuxitheone/PHP_Bot-ModInterface.git]

Place it in your web server directory, for example:

C:\xampp\htdocs\bot\

2 Requirements

PHP 8.1+

Enabled extensions:

pdo_sqlite  
curl  
mbstring  
json

Check your php.ini file and make sure these are not commented out.

3 Configuration

Create a file named .env in the project root:

.env

TWITCH_CHANNEL=yourchannelname
TWITCH_OAUTH=oauth:xxxxxxxxxxxxxxxxxxxx
TWITCH_CLIENT_ID=your_client_id
TWITCH_CLIENT_SECRET=your_client_secret

Get your OAuth token here: https://twitchapps.com/tmi/

4 Database & Admin

Open:

http://localhost/bot/web/migrate_users.php

→ ensures correct table columns

Then open:

http://localhost/bot/web/create_admin.php

→ creates your admin user

Login credentials:

Username: admin  
Password: demo

5 Start the Bot

Go to:

http://localhost/bot/web/login.php

Log in and click Start The bot runs in PHP behind the scenes and responds to chat commands.

6 (Optional) Live Log via WebSocket

Install Node.js, then run:

npm install ws
node ws_server.js

The dashboard will automatically switch to WebSocket mode if available.