forked from Cretiino/bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatBot Moderation
More file actions
1963 lines (1639 loc) · 57.7 KB
/
ChatBot Moderation
File metadata and controls
1963 lines (1639 loc) · 57.7 KB
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
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Generated by CoffeeScript 1.6.3
(function() {
var Command, RoomHelper, User, addCommand, afkCheck, afksCommand, allAfksCommand, announceCurate, antispam, apiHooks, avgVoteRatioCommand, badQualityCommand, beggar, chatCommandDispatcher, chatUniversals, cmds, commandsCommand, cookieCommand, data, dieCommand, disconnectLookupCommand, downloadCommand, forceSkipCommand, handleNewSong, handleUserJoin, handleUserLeave, handleVote, hook, initEnvironment, initHooks, initialize, lockCommand, lockskipCommand, msToStr, newSongsCommand, overplayedCommand, popCommand, populateUserData, pupOnline, pushCommand, reloadCommand, resetAfkCommand, roomHelpCommand, rulesCommand, settings, skipCommand, staffCommand, sourceCommand, statusCommand, swapCommand, themeCommand, undoHooks, unhook, unhookCommand, unlockCommand, updateVotes, uservoiceCommand, voteRatioCommand, whyMehCommand, whyWootCommand, wootCommand, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref3, _ref30, _ref32, ref33, _ref34, ref35, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
settings = (function() {
function settings() {
this.implode = __bind(this.implode, this);
this.intervalMessages = __bind(this.intervalMessages, this);
this.startAfkInterval = __bind(this.startAfkInterval, this);
this.setInternalWaitlist = __bind(this.setInternalWaitlist, this);
this.userJoin = __bind(this.userJoin, this);
this.getRoomUrlPath = __bind(this.getRoomUrlPath, this);
this.startup = __bind(this.startup, this);
}
settings.prototype.currentsong = {};
settings.prototype.users = {};
settings.prototype.djs = [];
settings.prototype.mods = [];
settings.prototype.host = [];
settings.prototype.hasWarned = false;
settings.prototype.currentwoots = 0;
settings.prototype.currentmehs = 0;
settings.prototype.currentcurates = 0;
settings.prototype.roomUrlPath = null;
settings.prototype.internalWaitlist = [];
settings.prototype.userDisconnectLog = [];
settings.prototype.voteLog = {};
settings.prototype.seshOn = false;
settings.prototype.forceSkip = false;
settings.prototype.seshMembers = [];
settings.prototype.launchTime = null;
settings.prototype.totalVotingData = {
woots: 0,
mehs: 0,
curates: 0
};
settings.prototype.pupScriptUrl = 'https://raw.github.com/SrNoName/BBBBB/master/TBRBot';
settings.prototype.afkTime = 30 * 60 * 1000;
settings.prototype.songIntervalMessages = [
{
interval: 7,
offset: 0,
msg: "/em: Mantenha-se sempre votando, se não será removido da lista de espera e da cabine de DJ."
},{
interval: 5,
offset: 0,
msg: "/em: Make sure that you're voting or you will be removed from the wait list and from the DJ Booth."
},{
interval: 9,
offset: 0,
msg: "/em: Entre no nosso grupo do facebook e fique por dentro de todas as nossas atualizações: https://www.facebook.com/groups/DTEplugdj/ "
}
];
settings.prototype.songCount = 0;
settings.prototype.startup = function() {
this.launchTime = new Date();
return this.roomUrlPath = this.getRoomUrlPath();
};
settings.prototype.getRoomUrlPath = function() {
return window.location.pathname.replace(/\//g, '');
};
settings.prototype.newSong = function() {
this.totalVotingData.woots += this.currentwoots;
this.totalVotingData.mehs += this.currentmehs;
this.totalVotingData.curates += this.currentcurates;
this.setInternalWaitlist();
this.currentsong = API.getMedia();
if (this.currentsong !== null) {
return this.currentsong;
} else {
return false;
}
};
settings.prototype.userJoin = function(u) {
var userIds, _ref;
userIds = Object.keys(this.users);
if (_ref = u.id, __indexOf.call(userIds, _ref) >= 0) {
return this.users[u.id].inRoom(true);
} else {
this.users[u.id] = new User(u);
return this.voteLog[u.id] = {};
}
};
settings.prototype.setInternalWaitlist = function() {
var boothWaitlist, fullWaitList, lineWaitList;
boothWaitlist = API.getDJs().slice(1);
lineWaitList = API.getWaitList();
fullWaitList = boothWaitlist.concat(lineWaitList);
return this.internalWaitlist = fullWaitList;
};
settings.prototype.activity = function(obj) {
if (obj.type === 'message') {
return this.users[obj.fromID].updateActivity();
}
};
settings.prototype.startAfkInterval = function() {
return this.afkInterval = setInterval(afkCheck, 2000);
};
settings.prototype.intervalMessages = function() {
var msg, _i, _len, _ref, _results;
this.songCount++;
_ref = this.songIntervalMessages;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
msg = _ref[_i];
if (((this.songCount + msg['offset']) % msg['interval']) === 0) {
_results.push(API.sendChat(msg['msg']));
} else {
_results.push(void 0);
}
}
return _results;
};
settings.prototype.implode = function() {
var item, val;
for (item in this) {
val = this[item];
if (typeof this[item] === 'object') {
delete this[item];
}
}
return clearInterval(this.afkInterval);
};
settings.prototype.lockBooth = function(callback) {
if (callback == null) {
callback = null;
}
return $.ajax({
url: "http://plug.dj/_/gateway/room.update_options",
type: 'POST',
data: JSON.stringify({
service: "room.update_options",
body: [
this.roomUrlPath, {
"boothLocked": true,
"waitListEnabled": true,
"maxPlays": 1,
"maxDJs": 5
}
]
}),
async: this.async,
dataType: 'json',
contentType: 'application/json'
}).done(function() {
if (callback != null) {
return callback();
}
});
};
settings.prototype.unlockBooth = function(callback) {
if (callback == null) {
callback = null;
}
return $.ajax({
url: "http://plug.dj/_/gateway/room.update_options",
type: 'POST',
data: JSON.stringify({
service: "room.update_options",
body: [
this.roomUrlPath, {
"boothLocked": false,
"waitListEnabled": true,
"maxPlays": 1,
"maxDJs": 5
}
]
}),
async: this.async,
dataType: 'json',
contentType: 'application/json'
}).done(function() {
if (callback != null) {
return callback();
}
});
};
return settings;
})();
data = new settings();
User = (function() {
User.prototype.afkWarningCount = 0;
User.prototype.lastWarning = null;
User.prototype["protected"] = false;
User.prototype.isInRoom = true;
function User(user) {
this.user = user;
this.updateVote = __bind(this.updateVote, this);
this.inRoom = __bind(this.inRoom, this);
this.notDj = __bind(this.notDj, this);
this.warn = __bind(this.warn, this);
this.getIsDj = __bind(this.getIsDj, this);
this.getWarningCount = __bind(this.getWarningCount, this);
this.getUser = __bind(this.getUser, this);
this.getLastWarning = __bind(this.getLastWarning, this);
this.getLastActivity = __bind(this.getLastActivity, this);
this.updateActivity = __bind(this.updateActivity, this);
this.init = __bind(this.init, this);
this.init();
}
User.prototype.init = function() {
return this.lastActivity = new Date();
};
User.prototype.updateActivity = function() {
this.lastActivity = new Date();
this.afkWarningCount = 0;
return this.lastWarning = null;
};
User.prototype.getLastActivity = function() {
return this.lastActivity;
};
User.prototype.getLastWarning = function() {
if (this.lastWarning === null) {
return false;
} else {
return this.lastWarning;
}
};
User.prototype.getUser = function() {
return this.user;
};
User.prototype.getWarningCount = function() {
return this.afkWarningCount;
};
User.prototype.getIsDj = function() {
var DJs, dj, _i, _len;
DJs = API.getDJs();
for (_i = 0, _len = DJs.length; _i < _len; _i++) {
dj = DJs[_i];
if (this.user.id === dj.id) {
return true;
}
}
return false;
};
User.prototype.warn = function() {
this.afkWarningCount++;
return this.lastWarning = new Date();
};
User.prototype.notDj = function() {
this.afkWarningCount = 0;
return this.lastWarning = null;
};
User.prototype.inRoom = function(online) {
return this.isInRoom = online;
};
User.prototype.updateVote = function(v) {
if (this.isInRoom) {
return data.voteLog[this.user.id][data.currentsong.id] = v;
}
};
return User;
})();
RoomHelper = (function() {
function RoomHelper() {}
RoomHelper.prototype.lookupUser = function(username) {
var id, u, _ref;
_ref = data.users;
for (id in _ref) {
u = _ref[id];
if (u.getUser().username === username) {
return u.getUser();
}
}
return false;
};
RoomHelper.prototype.userVoteRatio = function(user) {
var songId, songVotes, vote, votes;
songVotes = data.voteLog[user.id];
votes = {
'woot': 0,
'meh': 0
};
for (songId in songVotes) {
vote = songVotes[songId];
if (vote === 1) {
votes['woot']++;
} else if (vote === -1) {
votes['meh']++;
}
}
votes['positiveRatio'] = (votes['woot'] / (votes['woot'] + votes['meh'])).toFixed(2);
return votes;
};
return RoomHelper;
})();
pupOnline = function() {
return API.sendChat("/me: NoNameBot 1.0.0 ON!");
};
populateUserData = function() {
var u, users, _i, _len;
users = API.getUsers();
for (_i = 0, _len = users.length; _i < _len; _i++) {
u = users[_i];
data.users[u.id] = new User(u);
data.voteLog[u.id] = {};
}
};
initEnvironment = function() {
document.getElementById("button-vote-positive").click();
return document.getElementById("button-sound").click();
};
initialize = function() {
pupOnline();
populateUserData();
initEnvironment();
initHooks();
data.startup();
data.newSong();
return data.startAfkInterval();
};
afkCheck = function() {
var DJs, id, lastActivity, lastWarned, now, oneMinute, secsLastActive, timeSinceLastActivity, timeSinceLastWarning, twoMinutes, user, warnMsg, _ref, _results;
_ref = data.users;
_results = [];
for (id in _ref) {
user = _ref[id];
now = new Date();
lastActivity = user.getLastActivity();
timeSinceLastActivity = now.getTime() - lastActivity.getTime();
if (timeSinceLastActivity > data.afkTime) {
if (user.getIsDj()) {
secsLastActive = timeSinceLastActivity / 1000;
if (user.getWarningCount() === 0) {
user.warn();
_results.push(API.sendChat("@" + user.getUser().username + ", Eu não vi você votar durante 30 minutos. Vote nos próximos 2 minutos, se não será removido."));
} else if (user.getWarningCount() === 1) {
lastWarned = user.getLastWarning();
timeSinceLastWarning = now.getTime() - lastWarned.getTime();
twoMinutes = 2 * 60 * 1000;
if (timeSinceLastWarning > twoMinutes) {
user.warn();
warnMsg = "@" + user.getUser().username;
warnMsg += ", Eu não vi você votar durante 32 minutos. Vote no próximo minuto ou eu o removerei, este é seu ultimo aviso.";
_results.push(API.sendChat(warnMsg));
} else {
_results.push(void 0);
}
} else if (user.getWarningCount() === 2) {
lastWarned = user.getLastWarning();
timeSinceLastWarning = now.getTime() - lastWarned.getTime();
oneMinute = 1 * 60 * 1000;
if (timeSinceLastWarning > oneMinute) {
DJs = API.getDJs();
if (DJs.length > 0 && DJs[0].id !== user.getUser().id) {
API.sendChat("@" + user.getUser().username + ", Você teve 2 avisos. Por favor, mantenha-se sempre votando.");
API.moderateRemoveDJ(id);
_results.push(user.warn());
} else {
_results.push(void 0);
}
} else {
_results.push(void 0);
}
} else {
_results.push(void 0);
}
} else {
_results.push(user.notDj());
}
} else {
_results.push(void 0);
}
}
return _results;
};
msToStr = function(msTime) {
var ms, msg, timeAway;
msg = '';
timeAway = {
'days': 0,
'hours': 0,
'minutes': 0,
'seconds': 0
};
ms = {
'day': 24 * 60 * 60 * 1000,
'hour': 60 * 60 * 1000,
'minute': 60 * 1000,
'second': 1000
};
if (msTime > ms['day']) {
timeAway['days'] = Math.floor(msTime / ms['day']);
msTime = msTime % ms['day'];
}
if (msTime > ms['hour']) {
timeAway['hours'] = Math.floor(msTime / ms['hour']);
msTime = msTime % ms['hour'];
}
if (msTime > ms['minute']) {
timeAway['minutes'] = Math.floor(msTime / ms['minute']);
msTime = msTime % ms['minute'];
}
if (msTime > ms['second']) {
timeAway['seconds'] = Math.floor(msTime / ms['second']);
}
if (timeAway['days'] !== 0) {
msg += timeAway['days'].toString() + 'd';
}
if (timeAway['hours'] !== 0) {
msg += timeAway['hours'].toString() + 'h';
}
if (timeAway['minutes'] !== 0) {
msg += timeAway['minutes'].toString() + 'm';
}
if (timeAway['seconds'] !== 0) {
msg += timeAway['seconds'].toString() + 's';
}
if (msg !== '') {
return msg;
} else {
return false;
}
};
Command = (function() {
function Command(msgData) {
this.msgData = msgData;
this.init();
}
Command.prototype.init = function() {
this.parseType = null;
this.command = null;
return this.rankPrivelege = null;
};
Command.prototype.functionality = function(data) {};
Command.prototype.hasPrivelege = function() {
var user;
user = data.users[this.msgData.fromID].getUser();
switch (this.rankPrivelege) {
case 'host':
return user.permission === 5;
case 'cohost':
return user.permission >= 4;
case 'mod':
return user.permission >= 3;
case 'manager':
return user.permission >= 3;
case 'bouncer':
return user.permission >= 2;
case 'featured':
return user.permission >= 1;
default:
return true;
}
};
Command.prototype.commandMatch = function() {
var command, msg, _i, _len, _ref;
msg = this.msgData.message;
if (typeof this.command === 'string') {
if (this.parseType === 'exact') {
if (msg === this.command) {
return true;
} else {
return false;
}
} else if (this.parseType === 'startsWith') {
if (msg.substr(0, this.command.length) === this.command) {
return true;
} else {
return false;
}
} else if (this.parseType === 'contains') {
if (msg.indexOf(this.command) !== -1) {
return true;
} else {
return false;
}
}
} else if (typeof this.command === 'object') {
_ref = this.command;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
command = _ref[_i];
if (this.parseType === 'exact') {
if (msg === command) {
return true;
}
} else if (this.parseType === 'startsWith') {
if (msg.substr(0, command.length) === command) {
return true;
}
} else if (this.parseType === 'contains') {
if (msg.indexOf(command) !== -1) {
return true;
}
}
}
return false;
}
};
Command.prototype.evalMsg = function() {
if (this.commandMatch() && this.hasPrivelege()) {
this.functionality();
return true;
} else {
return false;
}
};
return Command;
})();
cookieCommand = (function(_super) {
__extends(cookieCommand, _super);
function cookieCommand() {
_ref = cookieCommand.__super__.constructor.apply(this, arguments);
return _ref;
}
cookieCommand.prototype.init = function() {
this.command = 'cookie';
this.parseType = 'startsWith';
return this.rankPrivelege = 'featured';
};
cookieCommand.prototype.getCookie = function() {
var c, cookies;
cookies = ["muita aveia", "um cafesinho", "um toddynho", "um copo de coca-cola", "uma dose de Ipioca", "limões", "um danoninho", "um cafe extra forte", "maçãs", "bananas", "um brinquedinho", "amendoins", "muita aveia"];
c = Math.floor(Math.random() * cookies.length);
return cookies[c];
};
cookieCommand.prototype.functionality = function() {
var msg, r, user;
msg = this.msgData.message;
r = new RoomHelper();
if (msg.substring(7, 8) === "@") {
user = r.lookupUser(msg.substr(8));
if (user === false) {
API.sendChat("/em: não encontrei ' " + msg.substr(8) + "' na sala. Então, sobra mais pra mim! d(>_<)b ");
return false;
} else {
return API.sendChat("/em: @" + user.username + ", @" + this.msgData.from + " o recompensou com " + this.getCookie() + ". Aproveite!");
}
}
};
return cookieCommand;
})(Command);
newSongsCommand = (function(_super) {
__extends(newSongsCommand, _super);
function newSongsCommand() {
_ref1 = newSongsCommand.__super__.constructor.apply(this, arguments);
return _ref1;
}
newSongsCommand.prototype.init = function() {
this.command = '!musicanova';
this.parseType = 'startsWith';
return this.rankPrivelege = 'featured';
};
newSongsCommand.prototype.functionality = function() {
var arts, cMedia, chans, chooseRandom, mChans, msg, selections, u, _ref2;
mChans = this.memberChannels.slice(0);
chans = this.channels.slice(0);
arts = this.artists.slice(0);
chooseRandom = function(list) {
var l, r;
l = list.length;
r = Math.floor(Math.random() * l);
return list.splice(r, 1);
};
selections = {
channels: [],
artist: ''
};
u = data.users[this.msgData.fromID].getUser().username;
if (u.indexOf("MistaDubstep") !== -1) {
selections['channels'].push('MistaDubstep');
} else if (u.indexOf("Underground Promotions") !== -1) {
selections['channels'].push('UndergroundDubstep');
} else {
selections['channels'].push(chooseRandom(mChans));
}
selections['channels'].push(chooseRandom(chans));
selections['channels'].push(chooseRandom(chans));
cMedia = API.getMedia();
if ((cMedia != null) && (_ref2 = cMedia.author, __indexOf.call(arts, _ref2) >= 0)) {
selections['artist'] = cMedia.author;
} else {
selections['artist'] = chooseRandom(arts);
}
msg = "Everyone's heard that " + selections['artist'] + " track! Get new music from http://youtube.com/" + selections['channels'][0] + " http://youtube.com/" + selections['channels'][1] + " or http://youtube.com/" + selections['channels'][2];
return API.sendChat(msg);
};
newSongsCommand.prototype.memberChannels = ["MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"];
newSongsCommand.prototype.channels = ["BassRape", "MonstercatMedia", "UKFdubstep", "DropThatBassline", "VitalDubstep", "AirwaveDubstepTV", "InspectorDubplate", "TehDubstepChannel", "UNITEDubstep", "LuminantNetwork", "TheSoundIsle", "PandoraMuslc", "MrSuicideSheep", "HearTheSensation", "bassoutletpromos", "MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"];
newSongsCommand.prototype.artists = ["Doctor P", "Excision", "Flux Pavilion", "Knife Party", "Rusko", "Bassnectar", "Nero", "Deadmau5", "Borgore", "Zomboy"];
return newSongsCommand;
})(Command);
whyWootCommand = (function(_super) {
__extends(whyWootCommand, _super);
function whyWootCommand() {
_ref2 = whyWootCommand.__super__.constructor.apply(this, arguments);
return _ref2;
}
whyWootCommand.prototype.init = function() {
this.command = '!NOTTURNO';
this.parseType = 'startsWith';
return this.rankPrivelege = 'featured';
};
whyWootCommand.prototype.functionality = function() {
var msg, nameIndex;
msg = "Se tu não entrar na linha, vai tomar um ban!";;
if ((nameIndex = this.msgData.message.indexOf('@')) !== -1) {
return API.sendChat(this.msgData.message.substr(nameIndex) + ', ' + msg);
} else {
return API.sendChat(msg);
}
};
return whyWootCommand;
})(Command);
themeCommand = (function(_super) {
__extends(themeCommand, _super);
function themeCommand() {
_ref3 = themeCommand.__super__.constructor.apply(this, arguments);
return _ref3;
}
themeCommand.prototype.init = function() {
this.command = '!temas';
this.parseType = 'startsWith';
return this.rankPrivelege = 'featured';
};
themeCommand.prototype.functionality = function() {
var msg1, msg2;
msg1 = "Todo tipo de musica eletronica de boa qualidade é permitida aqui. Incluindo Electro, Dubstep, Techno, Trap, EDM, ";
msg1 += "Hardstyle, House e Trance. ";
msg2 = "All kinds of electronic song of good quality is allowed here. Including Electro, Dubstep, Techno, Trap, EDM, ";
msg2 += "Hardstyle, House and Trance. ";
API.sendChat(msg1);
return setTimeout((function() {
return API.sendChat(msg2);
}), 750);
};
return themeCommand;
})(Command);
rulesCommand = (function(_super) {
__extends(rulesCommand, _super);
function rulesCommand() {
_ref4 = rulesCommand.__super__.constructor.apply(this, arguments);
return _ref4;
}
rulesCommand.prototype.init = function() {
this.command = '!regras';
this.parseType = 'startsWith';
return this.rankPrivelege = 'featured';
};
rulesCommand.prototype.functionality = function() {
var msg1, msg2;
msg1 = "1) Tempo máximo 6 min e 30 seg. ";
msg1 += "2) Não escrever em /me ou /em. ";
msg1 += "3) Respeitar os moderadores da sala.";
msg1 += "4) Sem flood no chat . ";
msg1 += "5) Proibido usar FanBot na sala ";
msg2 = "1) Maximum time 6 minutes and 30 seconds. ";
msg2 += "2) Can't write in /me or /em. ";
msg2 += "3) Respect the moderators of the room. ";
msg2 += "4) Without flood in the chat. ";
msg2 += "5) Can't ask positions ";
API.sendChat(msg1);
return setTimeout((function() {
return API.sendChat(msg2);
}), 750);
};
return rulesCommand;
})(Command);
roomHelpCommand = (function(_super) {
__extends(roomHelpCommand, _super);
function roomHelpCommand() {
_ref4 = roomHelpCommand.__super__.constructor.apply(this, arguments);
return _ref5;
}
roomHelpCommand.prototype.init = function() {
this.command = '!roomhelp';
this.parseType = 'startsWith';
return this.rankPrivelege = 'featured';
};
roomHelpCommand.prototype.functionality = function() {
var msg1, msg2;
msg1 = "Bem vindo a sala Electro, Trap & Dubstep Brasil ! ETD , Ser DJ: Crie uma lista de reprodução e coloque Musica do Youtube ou soundcloud. ";
msg1 += "Se é novo procure pelo seu nome na sua tela (próximo a cabine do DJ) e depois mude o nome. ";
msg1 += "Para Ganhar Pontos clique em Bacana. ";
msg2 = "Divirta-se! Qualquer outra duvida chame um adm da sala ";
API.sendChat(msg1);
return setTimeout((function() {
return API.sendChat(msg2);
}), 750);
};
return roomHelpCommand;
})(Command);
sourceCommand = (function(_super) {
__extends(sourceCommand, _super);
function sourceCommand() {
_ref6 = sourceCommand.__super__.constructor.apply(this, arguments);
return _ref6;
}
sourceCommand.prototype.init = function() {
this.command = ['!autor', '!author', '!autor'];
this.parseType = 'exact';
return this.rankPrivelege = 'featured';
};
sourceCommand.prototype.functionality = function() {
var msg;
msg = ' BOT criado por !Special Agent Infinit para a sala Electro, Trap & Dubstep Brasil | ETD ';
return API.sendChat(msg);
};
return sourceCommand;
})(Command);
wootCommand = (function(_super) {
__extends(wootCommand, _super);
function wootCommand() {
_ref7 = wootCommand.__super__.constructor.apply(this, arguments);
return _ref7;
}
wootCommand.prototype.init = function() {
this.command = '!autowoot';
this.parseType = 'startsWith';
return this.rankPrivelege = 'featured';
};
wootCommand.prototype.functionality = function() {
var msg, nameIndex;
msg = "Use o auto woot para evitar remoção da cabine de DJ por não estar votando. http://migre.me/fCWA2";
if ((nameIndex = this.msgData.message.indexOf('@')) !== -1) {
return API.sendChat(this.msgData.message.substr(nameIndex) + ', ' + msg);
} else {
return API.sendChat(msg);
}
};
return wootCommand;
})(Command);
badQualityCommand = (function(_super) {
__extends(badQualityCommand, _super);
function badQualityCommand() {
_ref8 = badQualityCommand.__super__.constructor.apply(this, arguments);
return _ref8;
}
badQualityCommand.prototype.init = function() {
this.command = '.ruim';
this.parseType = 'exact';
return this.rankPrivelege = 'bouncer';
};
badQualityCommand.prototype.functionality = function() {
var msg;
msg = "Não gostei da sua musica, tente melhorar da proxima vez";
return API.sendChat(msg);
};
return badQualityCommand;
})(Command);
downloadCommand = (function(_super) {
__extends(downloadCommand, _super);
function downloadCommand() {
_ref9 = downloadCommand.__super__.constructor.apply(this, arguments);
return _ref9;
}
downloadCommand.prototype.init = function() {
this.command = '!tbr';
this.parseType = 'exact';
return this.rankPrivelege = 'featured';
};
downloadCommand.prototype.functionality = function() {
var msg;
msg = " Participe do grupo ";
msg += " https://www.facebook.com/groups/plugdjteambrasil/ ";
return API.sendChat(msg);
};
return downloadCommand;
})(Command);
afksCommand = (function(_super) {
__extends(afksCommand, _super);
function afksCommand() {
_ref5 = afksCommand.__super__.constructor.apply(this, arguments);
return _ref10;
}
afksCommand.prototype.init = function() {
this.command = '!afks';
this.parseType = 'exact';
return this.rankPrivelege = 'mod';
};
afksCommand.prototype.functionality = function() {
var dj, djAfk, djs, msg, now, _i, _len;
msg = '';
djs = API.getDJs();
for (_i = 0, _len = djs.length; _i < _len; _i++) {
dj = djs[_i];
now = new Date();
djAfk = now.getTime() - data.users[dj.id].getLastActivity().getTime();
if (djAfk > (5 * 60 * 1000)) {
if (msToStr(djAfk) !== false) {
msg += dj.username + ' - ' + msToStr(djAfk);
msg += '. ';
}
}
}
if (msg === '') {
return API.sendChat("Ninguem está AFK VLW FLW 2BJ!");
} else {
return API.sendChat('AFKs: ' + msg);
}
};
return afksCommand;
})(Command);
allAfksCommand = (function(_super) {
__extends(allAfksCommand, _super);
function allAfksCommand() {
_ref6 = allAfksCommand.__super__.constructor.apply(this, arguments);
return _ref11;
}
allAfksCommand.prototype.init = function() {
this.command = '!allafks';
this.parseType = 'exact';
return this.rankPrivelege = 'mod';
};
allAfksCommand.prototype.functionality = function() {
var msg, now, u, uAfk, usrs, _i, _len;
msg = '';
usrs = API.getUsers();
for (_i = 0, _len = usrs.length; _i < _len; _i++) {
u = usrs[_i];
now = new Date();
uAfk = now.getTime() - data.users[u.id].getLastActivity().getTime();
if (uAfk > (10 * 60 * 1000)) {
if (msToStr(uAfk) !== false) {
msg += u.username + ' - ' + msToStr(uAfk);
msg += '. ';
}
}
}
if (msg === '') {
return API.sendChat("Nobody appears to be AFK!");
} else {
return API.sendChat('AFKs: ' + msg);
}
};
return allAfksCommand;
})(Command);
statusCommand = (function(_super) {
__extends(statusCommand, _super);
function statusCommand() {
_ref7 = statusCommand.__super__.constructor.apply(this, arguments);
return _ref12;
}
statusCommand.prototype.init = function() {
this.command = '!status';
this.parseType = 'exact';
return this.rankPrivelege = 'bouncer';
};
statusCommand.prototype.functionality = function() {