Skip to content

Chatbot Configuration guide

popcorn9499 edited this page Jun 8, 2019 · 20 revisions

Explaination

Chatbot is a module designed to relay messages from channels to other channels as specified.

Configuration

You have two parts to configure. Chatbot.json and chatbotIdentifier.json the configs are located under .\configs\chatbot\

Servers and sites that are predefined

Channels (for predefined ones for example youtube)

Youtubes predefined channel is Youtube

Any other service should have channels that are similar to what is defined in the service.

Servers (for predefined ones for example youtube)

Servers unless otherwise specified should be known by what it is called in the service.

Youtube however you only have one setting Youtube

Services

Services will be as follows

Youtube Discord irc

Config setup guide

chatbot.json

This is the part of the config for relaying messages around to relay the messages between different channels defining where everything should go. This config now also handles the Service Identifier.

basically to make a channel relayed you have to


    "thing2":{ //this is just a name to make a new section in the json config (may be used later)
        "From":{ //these define where messages come from
            "Channel": "Youtube", //defines the channel to come from
            "Service": "Youtube", //defines the server the channel and server r in
            "Server": "Youtube", //defines the server the channel and messages from from
            "Module": "Site" //defines the module for the channel to come from by default. (for now always site)
        },
        "To":{ //where the messages go to
            "Channel": "test", //the channel messages go to
            "Service": "Discord", //the service messages go to (different sites avaliable
            "Server": "Popicraft Network", //the server in said service messages go to
            "Module": "Site" //defines the module for the channel to come from by default. (for now always site)
        },
        ,
        "Formatting": "%serviceIcon% %authorName%: %message%", //the way the message gets formatted going to stuff like youtube
        "Identifier": "[some tag]" //the service icon you choose
    }

please remove the comments if copying and pasting to the chatbot.json file comments are (// whatever behind this)

You can have multiple channels just by following the json format and making more of the same thing just with a different key


chatbotIdentifier.json

The identifier brings a new formatting tool that can be used

%serviceIcon% which is effectively just a smaller description to show what service it is without long tags.

it can be used in ChatFormatting

to configure this identifier its quite simple. and subject to change in the future.

    "1": { //this is just a name to make a new section in the json config (may be used later)
        "To":{ //the details the message is going to
          "Channel": "test2", //channel the message is going to
          "Service": "Discord", //service the message is going to
          "Server": "Popicraft Network" //server the message is going to
        },
        "From":{ //details for where the message is coming from
          "Channel": "Youtube", //channel the message is coming from
          "Service": "Youtube", //service the message is coming from
           "Server": "Youtube" //server the message is coming from
        },
        "Identifier": "[T]" //the service icon you choose
    }

please remove the comments if copying and pasting to the chatbotIdentifier.json file comments are (// whatever behind this)

Clone this wiki locally