To use this bot, you need to set up the configuration file config.json
with the following variables:
twitch_username
: Twitch bot username or displayname.twitch_password
: OAuth token for your Twitch Bot account.twitch_oauth
: OAuth token for your main Twitch account.twitch_channel
: Twitch channel your Twitch bot will talk in.dbPath
: Path to the game database file (loottracker.db).clientId
: Twitch Client ID for API authentication.
-
Twitch Username:
- Create a new account through Twitch, this will be your bot.
- Enter the desired Twitch bot username.
- It should be the username associated with your Twitch bot account.
- Example:
tannerdinobot
-
Twitch Bot OAuth Token:
- Make sure you're signed into your Twitch Bot account
- Visit the Twitch Chat OAuth Password Generator page: https://twitchapps.com/tmi/
- Click on the "Connect with Twitch" button and authorize the app to access your account.
- Copy the OAuth token generated by the website.
- Example:
OAuth:rfx2uswqe8l4g1mkagrvg5tv0ks3
-
Twitch Main OAuth Token:
- Make sure you're signed into your main Twitch account
- Visit the Twitch Chat OAuth Password Generator page: https://twitchapps.com/tmi/
- Click on the "Connect with Twitch" button and authorize the app to access your account.
- Copy the OAuth token generated by the website.
- Example:
rfx2uswqe8l4g1mkagrvg5tv0ks3
-
Twitch Channel:
- Enter the Twitch channel you want the bot to join.
- Example:
tannerdino
-
Game Database Path:
- Navigate to
C:\Users\NAME\AppData\Local\Jagex\Old School RuneScape\users\
- Look for a folder named with a bunch of numbers.
- In this folder you should find the loottracker.db
- This is the path where the game stores the loot tracker database file.
- Example:
C:\Users\NAME\AppData\Local\Jagex\Old School RuneScape\users\NUMBERS\loottracker.db
- Navigate to
-
Twitch Client ID:
- Obtain a Twitch Client ID for API authentication.
- Go to https://dev.twitch.tv/console
- Login to your main Twitch account
- Visit the Twitch Developer Console: https://dev.twitch.tv/console
- Create a new application and obtain the Client ID.
- Example:
hof5gwx0su6owfnys0yan9c87zr6t
- Open Command Prompt (cmd) on your computer.
- Navigate to the directory where you have your bot code and configuration file. For example, if your bot code is located in
C:\MyBot
and the configuration fileconfig.json
is in that directory, you can navigate to it by running the following command:cd MyBot\src\config
- Copy and paste the following command into cmd and press Enter to create a new
config.json
file:echo { "twitch": { "username": "", "password": "", "oauth": "", "channels": [], "dbPath": "", "clientId": "" } } > config.json
- Replace the empty fields (
username
,password
,oauth
,channels
,dbPath
, andclientId
) with your desired values.
- Once you have set all the required values in the
config.json
file, you can proceed with running your bot code.
- Open Command Prompt (cmd) on your computer.
- Navigate to your Twitch bots directory with the command:
cd MyBot\src
- Run index.js to start the bot:
node index.js
- Command Prompt should relay a message along the lines of
Connected to irc-ws.chat.twitch.tv:443