-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.toml
143 lines (131 loc) · 5.92 KB
/
example.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# This is an example configuration file for Robot.
# Most options that have string values have environment variables interpolated.
# This example uses that interpolation to integrate with systemd's encrypted
# credentials protocol, by referring to secrets under $CREDENTIALS_DIRECTORY.
# secret is the path to a file containing the secret key used to encrypt
# Robot's durable secrets, such as OAuth2 refresh tokens, as well as to
# generate user hashes for identity obfuscation. The entire content of the file
# is the key. It should be a securely generated random blob.
secret = '$CREDENTIALS_DIRECTORY/key'
[owner]
# name is the name of the owner, used for certain self-description commands.
# It does not need to be a username.
name = 'zephyrtronium'
# contact is a description of how to contact the owner.
contact = '/w zephyrtronium'
# name and contact are used together to respond to commands like "who manages you?"
# in a message that looks like
# "My operator is {name}. {contact} is the best way to contact {name}."
# db is a table of databases used by the bot.
# Exactly one of sqlbrain and kvbrain must be defined.
[db]
# sqlbrain is an SQLite3 connection string for the brain database.
# If sqlbrain is defined, the SQLite3 implementation is used.
sqlbrain = 'file:$ROBOT_SQLITE'
# kvbrain is the directory in which learned knowledge is stored.
# If kvbrain is defined, the Badger implementation is used.
#kvbrain = '$ROBOT_KNOWLEDGE'
# kvflag configures the brain database as a Badger "superflag" string.
# It is ignored when not using the Badger implementation.
#kvflag = ''
# privacy is an SQLite3 connection string for the database where privacy
# information is stored.
privacy = 'file:$ROBOT_SQLITE'
# spoken is an SQLite3 connection string for the database where generated
# message traces are stored.
spoken = 'file:$ROBOT_SQLITE'
# http is the settings for the bot's HTTP API.
[http]
# listen is the address and port on which to listen.
# If omitted, the HTTP API is disabled.
listen = ':4959'
# global includes chat settings that apply to all channels.
[global]
# block is a regex that blocks messages from being learned or copypastad in any channel.
# Unlike most string options, it is not expanded with environment variables.
block = '(?i)bad\s+stuff[^$x]'
# meme is a regex that overrides block for copypasta only.
meme = '^\S*$'
# global.emotes is a table of emotes to use in every channel along with their
# relative weights.
[global.emotes]
'' = 4
';)' = 1
# global.effects is a table of effects to use in every channel along with their
# relative weights.
# The available effects are '', 'OwO', 'AAAAA', and 'o'.
[global.effects]
'' = 18
'OwO' = 1
'AAAAA' = 0
'o' = 1
# global.privileges is a table of privileges across entire services.
# Currently, the only entry in it is twitch.
[global.privileges]
twitch = [
{ name = 'nightbot', level = 'ignore' },
{ name = 'streamelementsbot', level = 'ignore' },
]
[tmi]
# cid is the Twitch app's client ID.
cid = 'hof5gwx0su6owfnys0nyan9c87zr6t'
# secret is the path to a file containing the Twitch app's client secret.
secret = '$CREDENTIALS_DIRECTORY/twitch_client_secret'
# redirect is the OAuth2 redirect URL configured for the application.
# As Robot uses the device code flow for Twitch, the redirect is unused, but
# the value here must match the configuration in the developer portal.
redirect = 'http://localhost'
# token is the file in which to persist the OAuth2 refresh token. If the file
# exists, it should have permissions 0600. It is encrypted with a key derived
# from the key given in the top-level secret.
token = '/var/robot/tmi_refresh'
# owner is the owner user. This user can use special commands for
# administrating the bot.
owner = { id = '51421897', name = 'zephyrtronium' }
# rate is the message rate limit for TMI.
rate = { every = 30, num = 20 }
# Each channel on Twitch is a separate table under the twitch table.
[twitch.bocchi]
# channels is the list of channels using this configuration. It is an array to
# support future integrations.
channels = ['#bocchi']
# learn is the tag applied to learned Markov chain data from this channel.
# If omitted or empty, learning is disabled. A channel with learning disabled
# can still use a send tag to speak.
learn = 'bocchi'
# send is the tag used to select data to generate messages in this channel.
# If omitted or empty, speaking is disabled, except via messages with fixed
# responses. A channel with speaking disabled can still use a learn tag to
# collect data, but actually doing this could be a privacy concern.
# Usually, send should match learn within a channel.
send = 'bocchi'
# block is a regex that blocks messages from being learned in this channel. Any
# message containing text matching this or the global block regex is not used
# for learning. block also prevents a message from contributing to copypasta
# unless the message additionally matches meme, below.
# Unlike most string options, it is not expanded with environment variables.
block = '(?i)cucumber[^$x]'
# responses is the probability of generating a random message when a
# non-command message is received.
responses = 0.02
# rate is the rate limit parameters for interactions in this channel.
rate = { every = 10.1, num = 2 }
# copypasta is the configuration of copypastaing.
copypasta = { need = 2, within = 30 }
# meme overrides block for copypasta only.
meme = '^\S*$'
# Access levels for users.
# Each entry must have a name or ID and a level. If both a name and ID are
# given, the name is ignored.
# The valid levels are 'ignore' to disable use of all commands, including
# prompting, or 'moderator' to add use of moderation commands.
# Note that on Twitch, the broadcaster and channel moderators always have
# moderator privileges.
# Unlike most strings, these are not expanded with environment variables.
privileges = [
{ name = 'zephyrtronium', level = 'moderator' },
]
[twitch.bocchi.emotes]
'btw make sure to stretch, hydrate, and take care of yourself <3' = 1
[twitch.bocchi.effects]
'AAAAA' = 44444