SHOW:
|
|
- or go back to the newest paste.
1 | (function(){ | |
2 | ||
3 | var bot= { | |
4 | version: "1.0.0", | |
5 | name: "Deobot", | |
6 | creator: "Deomys", | |
7 | start_time: new Date(), | |
8 | ||
9 | room_settings: { | |
10 | maximum_song_lenght: 6, | |
11 | lenght_skip: true, | |
12 | max_dc: 60, | |
13 | spam_guard: true, | |
14 | song_stat: true, | |
15 | welcome_user: true, | |
16 | }, | |
17 | ||
18 | room: { | |
19 | user: [], | |
20 | }, | |
21 | ||
22 | event: { | |
23 | chat: function(data){ | |
24 | if(data.type === "message") { | |
25 | if(data.message[0] == "!") { | |
26 | API.moderateDeleteChat(data.chatID); | |
27 | API.sendChat("/me command received"); | |
28 | } | |
29 | } | |
30 | }, | |
31 | }, | |
32 | ||
33 | connect_API: function(){ | |
34 | API.on(API.CHAT, this.event.chat); | |
35 | API.chatLog("API connected!"); | |
36 | }, | |
37 | ||
38 | startup: function(){ | |
39 | var u = API.getUser(); | |
40 | if(u.permission < 2) return API.chatLog("You need to be at least bouncer to run the bot"); | |
41 | this.connect_API(); | |
42 | ||
43 | - | API.sendChat(name + " v" + version + " started!"); |
43 | + | API.sendChat(name + " v" + this.version + " started!"); |
44 | }, | |
45 | }; | |
46 | API.chatLog("Script launched"); | |
47 | bot.startup(); | |
48 | }).call(this); |