Skip to content

2: Config

tarrynt whitty edited this page Jan 25, 2024 · 2 revisions

Config

If no config exists the first time you run the application it should create the config for you then exit out run the application by ether running

python ./app.py

from the terminal or running the start.bat file

after this is done the application will create a config.json file for you and exit.

open this file in your preferred text editor

{
    "channel": "",
    "clientID": "",
    "clientSecret": "",
    "Super_Moderators": [
        "channel_owner"
    ],
    "worker_update_rate": 60,
    "Basic_Commands": true,
    "Chat_log": true,
    "Ban_log": true,
    "Unban_log": true,
    "Mini_games": true,
    "Mini_games_pointsperwin": 100,
    "Shoutout_Auto": true,
    "Shoutout_Soft": true,
    "Shoutout_Message": "Check out {user} at https://twitch.tv/{user} !",
    "Shoutout_list": [
        "target_user1"
    ],
    "faq": true,
    "faq_list": [
        "question1",
        "question2"
    ],
    "rules": true,
    "rules_list": [
        "rule1",
        "rule2"
    ],
    "lastwhereChannel": 3,
    "wherelocations": [
        "tech basement",
        "Avalon puris",
        "Tara Shadow Mission",
        "Tailteann Shadow Mission",
        "Ably Dungeon",
        "Ciar Dungeon",
        "Rundal Dungeon",
        "Glenn",
        "Crom Bas",
        "Tir Chonaill",
        "Dunbarton"
    ]
}

will be the predefined config file

in order to populate this you will need to create a twitch developer account and create a application

create twitch application

navigate over to https://dev.twitch.tv/ and log in with your twitch account it will request access to your twitch account. accept this image

Next in the top right of the dev page there will be "your console" click here to enter your console https://dev.twitch.tv/console

Inside of the dev console you will need to click on "register your application" under "applications image

setting up your application

you will need to name the application, this can be anything.

For our example we will just name it "tadabotdoe" as it does not matter.

Under "OAuth Redirect URLS" this does matter, add http://localhost:17563 as the url and click add

For Category Select "Chatbot" as this is what was used in creation. "Broadcaster Suite" should work too

Lastly set the Client type to "Confidential"

Complete the CAPTCHA if needed

image

If you settings look similar hit the create button

Client details

once you have created your application you will be bought to a page with a list of all your twitch apps.

select manage for the one you just created

You will be bought to a page similar to the creation page. here we will grab our client ID and client Secret.

DO NOT SHARE THIS WITH ANYONE FOR ANY REASON.

Copy the "Client ID" from the client ID box. put it on a text file for later

Next Click on "New Secret" to create a new client Secret

It will ask if your sure. click okay.

You will then get a client secret, copy this put it in a text file we will need it in next step.

setting up config

we can now edit our config to match our needs.

channel this is your channel name. enter it here. for me it would be "riskypoi" clientID this is your client id from the application creation in last step. paste it here clientSecret this is your client secret from last step. paste it here.

with those 3 fields the bot will be able to log in and perform its actions.

Super_Moderators This is a list of people that are able to to use "higher perm" functions such as command creation, editing and deleting

example of how it would be filled out for my stream

example of how it would be filled out for my stream

worker_update_rate this is how often some functions will run for checking on updates in the stream. i would recommend leaving this at 60

[Basic_Commands, Chat_log, Ban_log, Unban_log, Mini_games] These are all modules that can be turned off if you dont feel you need them

Mini_games_pointsperwin how many points a user will get each time they win a minigame

Shoutout_Auto when a user in the shout out list speaks in stream for the first time. shout out them

Shoutout_Soft only post a message to check out their stream if true

Shoutout_Message the message to post when shouting out a user

Shoutout_list the list of channels you wish to auto shout out if they appear.

example (check them out)

image

faq if we want to have a !faq command users can run

faq_list list of faq messages that will be send if command is run

Example

image

rules if we want a !rules command

rules_list list of rules for the stream

example

image

defaultwherechannel this is for a command mostly used for mabinogi players, if your a mabi streamer set change this number to the channel you normally host runs on.

wherelocations this is a list of places that you host runs in. used to populate the UI in the front end.

next steps

Starting the application https://github.com/riskdoe/Project-Tada/wiki/3:-Running