twitch_client:
This is a config file reference. Click for instructions.
This page is reference material which explains every setting and option for this section of an MPF yaml config file. See the instructions for config files for formatting and other details. See our guide to config file examples for more examples of real configs in action.
Valid in | |
---|---|
machine config files | YES |
mode config files | NO |
The twitch_client:
section of your config is where you configure the
built-in Twitch chat monitor.
Before using this plugin you must install the irc library with
pip3 install irc
twitch_client:
user: TwitchBotAccount
password: oauth:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
channel: ChatChannel
machine_vars:
twitch_user:
initial_value: 'TwitchBotAccount'
value_type: str
twitch_password:
initial_value: 'oauth:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
value_type: str
twitch_channel:
initial_value: 'ChatChannel'
value_type: str
twitch_client:
user_var: twitch_user
password_var: twitch_password
channel_var: twitch_channel
DO NOT CHECK YOUR PASSWORD INTO SOURCE CONTROL. If you use a service like Github you should not check in your password. If this is stored publicly then someone could log in as you on Twitch.
Optional settings
The following sections are optional in the twitch_client:
section of
your config. (If you don't include them, the default will be used).
channel:
Single value, type: string
. Defaults to empty.
The channel on Twitch which will be monitored for messages.
channel_var:
Single value, type: string
. Defaults to empty.
his is the machine variable name that contains the channel on Twitch which will be monitored for messages.
password:
Single value, type: string
. Defaults to empty.
This is a Twitch OAuth token, not the actual password of the user. You can generate this token at https://twitchapps.com/tmi/
password_var:
Single value, type: string
. Defaults to empty.
This is the machine variable name that contains the password to use when connecting to Twitch, This is a Twitch OAuth token, not the actual password of the user. You can generate this token at https://twitchapps.com/tmi/
When you run mpf -b
it may show your token in the machine variables
portion of the window. Be careful what you share on stream.
user:
Single value, type: string
. Defaults to empty.
This is the user that will connect to Twitch. You may want to create a separate bot account on Twitch to use for this purpose.
user_var:
Single value, type: string
. Defaults to empty.
This is the machine variable name that contains the user that will connect to Twitch. You may want to create a separate bot account on Twitch to use for this purpose.
Related How To guides
Help us write it!
This section is unwritten or needs an update or edit. Can you help write it? Get your name in lights and geeky pinball bragging rights! Hit the magic sparkly wand to the right of the title to see this page source on GitHub. Then add/edit and submit your change. It's easy!
Something missing or wrong? You can fix it!
This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?
Please help us! You can fix it yourself and be an official "open source" contributor!
It's easy! See our Beginner's guide to editing the docs.
Page navigation via the keyboard: < >
You can navigate this site via the keyboard. There are two modes:
General navigation, when search is not focused:
- F , S , / : open search dialog
- P , , : go to previous page
- N , . : go to next page
While using the search function:
- Down , Up : select next / previous result
- Esc , Tab : close search
- Enter : go to highlighted page in the results