forked from CTCC1/Pokemon-Showdown-Node-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-example.js
404 lines (319 loc) · 7.05 KB
/
config-example.js
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
/*
config.js - Configuration File
*/
/*
* Connection Details
*
* NOTE: Do NOT use "[server].psim.us", that is the client url
* If you don't know what are the server, port or serverid values
* run 'node getserver.js' to get them
*
*/
exports.server = 'localhost';
exports.port = 8000;
exports.serverid = 'localhost';
exports.autoReconnectDelay = 10 * 1000;
exports.connectionTimeout = 2 * 60 * 1000;
/*
* Crash Guard
*
* If true, write errors to console instead of crashing
*/
exports.crashguard = true;
/*
* Security log
*/
exports.securityLog = {ageOfLogs: 7};
/*
* Watch Config
*/
exports.watchconfig = true;
/*
* Login Details
*/
exports.nick = '';
exports.pass = '';
exports.autoReloginDelay = 60 * 1000;
/*
* Rooms to join
*/
exports.rooms = ['lobby'];
/*
* exports.rooms = 'all'; //For joining all rooms
* exports.rooms = 'official'; //For joining official rooms
* exports.rooms = 'public'; //For joining not-official rooms
* exports.rooms = ['room1', 'room2']; //For joining some rooms
*/
exports.privateRooms = { //Rooms listed here will be ignored by seen command
//privateroomname: true
};
exports.ignoreRooms = { //Rooms listed here will be ignored by CommandParser (bot is "asleep" in those rooms)
//roomid: true
};
exports.initCmds = ['|/avatar 120']; // Other commands (avatar, blockchallenges, etc)
/*
* Auth configuration
*/
exports.exceptions = {
// 'userid': true
};
/*
* 'userid': 'rank' or 'userid': true for full access
* Example:
*
* exports.exceptions = {
* 'ecuacion': true,
* 'excepted': true
* };
*
*/
exports.ranks = ['+', '\u2605', '%', '@', '*', '#', '&', '~'];
exports.globalPermissions = {
'voice': '+', //Min rank to broadcast in a server
'driver': '%', //Min rank to mute. Also min staff rank
'moderator': '@', //Min rank to ban
'roomowner': '#', //Rank for using room settings commands like set, lang, mod...
'admin': '~' //Rank for using global admin commands
};
/*
* Commands configuration
*/
exports.commandTokens = ['.']; //Array of valid command characters
exports.defaultPermission = '%';
exports.permissionExceptions = {
//command: 'rank'
'say': '#',
'info': '+',
'wall': '%',
'autoban': '#',
'banword': '#',
'joinphrase': '#',
'challenge': '%',
'searchbattle': '~',
'tournament': '@',
'games': '#'
};
exports.botguide = "https://github.com/Ecuacion/Pokemon-Showdown-Node-Bot/blob/master/commands/README.md";
//When you pm the bot but don't use a command, it replies you this message. Example: "Hi, I'm a bot. Use .help to view a command guide"
//The var #USER is replaced with the username that pms it
exports.pmhelp = "Hi #USER! I am a robot, please PM another staff member if you need help. Command guide: https://github.com/Ecuacion/Pokemon-Showdown-Node-Bot/blob/master/commands/README.md";
/*
* Language configuration
*/
exports.language = 'english';
/*
* Configuration for console messages
*/
exports.debug = {
/* Basic messages - Production Mode */
error: true,
ok: true,
errlog: true,
info: true,
room: true,
/* Monitoring */
monitor: true,
status: true,
battle: false,
/* Debug Mode */
debug: false,
cmdr: false,
/* Low Level */
recv: false,
sent: false
};
/*
* Configuration for specific
* commands and features
*/
/*
* Moderation
*/
exports.moderation = {
modException: '%', // Min rank for not receive moderation
allowmute: true,
disableModNote: false,
MOD_CONSTS: {
FLOOD_MESSAGE_NUM: 5,
FLOOD_PER_MSG_MIN: 500, // this is the minimum time between messages for legitimate spam. It's used to determine what "flooding" is caused by lag
FLOOD_MESSAGE_TIME: 6 * 1000,
MIN_CAPS_LENGTH: 18,
MIN_CAPS_PROPORTION: 0.8,
MAX_STRETCH: 7,
MAX_REPEAT: 4
},
values: {
'spam-p': 3,
'spam': 4,
'spam-link': 4,
'flood-hard': 3,
'flood': 2,
'caps': 1,
'stretch': 1,
'banwords': 2,
'inapwords': 2,
'servers': 2,
'youtube': 2,
'spoiler': 2,
'replays': 1
},
modDefault: {
//basic mods
'caps': 1,
'stretching': 1,
'flooding': 1,
'spam': 1,
'bannedwords': 1,
'inapropiate': 1,
//specific mods
'spoiler': 0,
'youtube': 0,
'psservers': 0,
'replays': 0,
//multiple infraction
'multiple': 1,
//zero tolerance
'zerotol': 1
},
punishments: [
"warn",
"mute",
"hourmute",
"roomban"
],
psServersExcepts: {
"showdown": 1,
"smogtours": 1,
"sim": 1
},
zeroToleranceDefaultLevel: 'h',
zeroToleranceLevels: {
'l': {name: 'Low', value: 1},
'n': {name: 'Normal', value: 2},
'h': {name: 'High', value: 3}
}
};
/*
* Battles
*/
exports.aceptAll = false;
exports.maxBattles = 1;
exports.initBattleMsg = ['gl hf'];
exports.winmsg = ['GG', 'g_g'];
exports.losemsg = ['gg', 'wp'];
exports.battleMessages = {
/* Examples of battle messages:
'crit': {
'self': ['lol that hax', 'stop haxing pls'],
'foe': ['sorry', 'wow sorry for that', 'get critted']
},
'miss': {
'self': ['wow hax', 'lol #poke you\'re blind']
}
*/
};
exports.battleModules = {
/* Algorithms for use in battles */
"challengecup1v1": "ingame-nostatus",
"1v1": "ingame-nostatus"
};
//exports.battleLog = {ageOfLogs: 1}; // Days
exports.abandonedBattleAutojoin = true;
exports.ladderCheckInterval = 10 * 1000;
exports.ladderNumberOfBattles = 1;
exports.formatAliases = {
'random': 'Random Battle',
'randomdoubles': 'Random Doubles Battle',
'randomtriples': 'Random Triples Battle',
'doubles': 'Doubles OU',
'triples': 'Smogon Triples',
'vgc': 'Battle Spot Doubles (VGC 2015)',
'vgc2015': 'Battle Spot Doubles (VGC 2015)',
'ag': 'Anything Goes',
'oras': 'OU',
'bw': '[Gen 5] OU',
'dpp': '[Gen 4] OU',
'adv': '[Gen 3] OU',
'gsc': '[Gen 2] OU',
'rby': '[Gen 1] OU'
};
/*
* Tournaments
*/
exports.tourDefault = {
format: 'ou',
type: 'elimination',
maxUsers: null,
timeToStart: 30 * 1000,
autodq: 1.5,
scoutProtect: false
};
exports.leaderboards = {};
/* Leaderboard example:
exports.leaderboards['tournaments'] = {
winnerPoints: 5,
finalistPoints: 3,
semiFinalistPoints: 1,
battlePoints: 0,
onlyOfficial: true // If true, only official tours (must use .official command) will be counted
};
*/
/*
* Youtube
*/
exports.youtube = {
enableByDefault: false
};
/*
* Chat Logger
*/
exports.chatLogger = {
rooms: [],
ignore: {'tournament': ['update', 'updateEnd'], 'formats': true, 'challstr': true, 'updateuser': true, 'queryresponse': true},
logIntroMessages: true,
ageOfLogs: 7 //in days (max age of logs, 0 to keep logs infinitely)
};
/*
exports.logServer = {
port: 5400,
bindaddress: null,
users: {
'admin': {
name: 'Administrator',
pass: 'password',
access: {'room1': 1, 'room2': 1}
}
},
rooms: {
'room1': {private: true},
'room2': {private: true}
}
};
*/
/*
* Auto-Invite
*/
exports.autoInvite = [
//{linked: 'public room linked', private: 'private room', rank: '+'}
];
/*
* GitHub
* Read this: https://developer.github.com/webhooks/creating/
*/
exports.github = {
room: 'development',
secret: "",
port: 3420
};
/*
* Groupchats
*/
exports.groupchats = {};
exports.groupChatTryJoinInterval = 60 * 1000;
/* Test example
exports.groupchats['groupchat-ecuacion-test'] = {
toJoin: ['/join groupchat-ecuacion-test'],
onJoin: ['Hi guys!'],
onLeave: []
};
*/