forked from benlk/sadface
-
Notifications
You must be signed in to change notification settings - Fork 3
/
config_schema.json
278 lines (278 loc) · 11.2 KB
/
config_schema.json
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
{
"$schema": "http://json-schema.org/schema#",
"title": "Bot config",
"type": "object",
"properties": {
"irc": {
"description": "IRC configuration for bot",
"type": "object",
"properties": {
"host": {
"description": "Host URL for IRC server to connection",
"type": "string"
},
"port": {
"description": "Port to use for IRC server connection",
"type": "integer",
"minimum": 0
},
"ssl": {
"description": "To use SSL or not",
"type": "boolean",
"default": false
},
"nickname": {
"description": "List of nicks to use. If one is in use, next one is tried",
"type": "array",
"minItems": 2,
"uniqueItems": true,
"items": {
"type": "string"
}
},
"password": {
"description": "NickServ password",
"oneOf": [{"type": "string"}, {"type": "null"}],
"default": null
},
"realname": {
"description": "Real name of bot",
"type": "string"
},
"username": {
"description": "User name of bot",
"type": "string"
},
"user_info": {
"description": "User info query string",
"type": "string"
},
"version_info": {
"description": "Version info of this bot",
"type": "object",
"default": {},
"properties": {
"name": {
"type": "string",
"default": "sadface"
},
"number": {
"type": "string",
"default": "rev7"
}
}
},
"source": {
"description": "Source code",
"type": "string",
"default": "https://github.com/anirbanmu/dagbot"
},
"responsive_channels": {
"description": "Channels to join where the bot will be responsive & their corresponding chattiness (how often the bot replies to people without prompting; 1.0 = 100% & 0.0 is 0%)",
"type": "object",
"default": {},
"patternProperties": {
"^#\\S+$" : {
"type": "object",
"default": {},
"properties": {
"p": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0,
"default": 0.0
},
"password": {
"type": "string",
"default": ""
},
"quiet_hours": {
"type": "string",
"default": ""
}
}
}
},
"additionalProperties": false
},
"unrecorded_channels": {
"description": "Responsive but unrecorded for brain. Same format as responsive_channels.",
"type": "object",
"default": {},
"patternProperties": {
"^#\\S+$" : {
"type": "object",
"default": {},
"properties": {
"p": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0,
"default": 0.0
},
"password": {
"type": "string",
"default": ""
},
"quiet_hours": {
"type": "string",
"default": ""
}
}
}
},
"additionalProperties": false
},
"unresponsive_channels": {
"description": "List of channels where the bot will only listen and never respond",
"type": "object",
"default": {},
"patternProperties": {
"^#\\S+$" : {
"type": "object",
"default": {},
"properties": {
"p": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0,
"default": 0.0
},
"password": {
"type": "string",
"default": ""
},
"quiet_hours": {
"type": "string",
"default": ""
}
}
}
},
"additionalProperties": false
},
"ignore_users": {
"description": "List of users to always ignore",
"type": "array",
"default": [],
"uniqueItems": true,
"items": {
"type": "string"
}
},
"unrecorded_users": {
"description": "List of users to respond to but not record",
"type": "array",
"default": [],
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"required": ["host", "port", "nickname", "realname", "username", "user_info"]
},
"brain": {
"description": "Markov brain related configuration",
"type": "object",
"properties": {
"reply_mode": {
"description": "To reply to direct notices or not? 0 for no replies to messages. 1 for replies to messages containing a highlight & 2 for replies to messages starting with a highlight, of the form nickname + '[:,#]* ?'",
"type": "integer",
"minimum": 0,
"maximum": 2
},
"brain_file": {
"description": "Location of a plain text file containing sentences separated by \n",
"type": "string"
},
"brain_db": {
"description": "Location of a sqlite db of generated markov chains matching the brain_file \n",
"type": "string"
},
"chain_length": {
"description": "How many words to use to find the next sentence",
"type": "integer",
"minimum": 1
},
"max_words": {
"description": "Maximum sentence length in words, can be very large. Keep it small to prevent flooding.",
"type": "integer"
},
"censored_words": {
"description": "Words to not include in generated sentences",
"type": "array",
"default": [],
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"required": ["reply_mode", "brain_file", "brain_db", "chain_length", "max_words"]
},
"commands": {
"description": "Command related configuration",
"type": "object",
"default": {},
"properties": {
"static_commands": {
"description": "Simple commands with a set pool of responses to be chosen from at random.",
"type": "object",
"default": {},
"minItems": 1,
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"dynamic_aliases": {
"description": "Aliases for dynamic commands. Property name is the original command and it's value would be a list of aliases.",
"type": "object",
"default": {},
"additionalProperties": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
}
},
"command_configs": {
"description": "Embedded configs for specific commands keyed by name of command module",
"type": "object",
"default": {}
},
"triggers": {
"description": "Characters or strings that will trigger commands",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"default": ["^", ",", "`", "~"]
},
"deprecated_triggers": {
"description": "Deprecated trigger commands",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"default": ["@"]
},
"disabled_commands": {
"description": "Disabled plugin commands",
"type": "array",
"items": {
"type": "string"
},
"default": []
}
}
}
},
"required": ["irc", "brain"]
}