-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfig.js
171 lines (152 loc) · 7.67 KB
/
config.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
module.exports = {
// Your bot name. Typically, this is your bot's username without the discriminator.
// i.e: if your bot's username is MemeBot#0420, then this option would be MemeBot.
name: "Z-Bot",
// Needs to be exactly the same as your discord server name. ( To know where to log ).
discordServerName: 'ZBot',
version: "1.0.0",
// The bot's command prefix (The rcon prefix is lower in config.). The bot will recognize as command any message that begins with it.
// i.e: "!zbot foo" will trigger the command "foo",
// whereas "Z-Bot foo" will do nothing at all.
prefix: "!zbot",
// Your bot's user token. If you don't know what that is, go here:
// https://discordapp.com/developers/applications/me
// Then create a new application and grab your token.
token: "NjEzNjgyODk0Nzk1NDQwMTI4.XV0ezg.xxxxxxxxxxxxxxxxxxxxxx", // Test token (Z-Bot (Dev))
encryptionKey: '4zcMONp61gpVDcuckG0u', // leave it be
defaultPlayingStatus: 'RCon',
// If this option is enabled, the bot will delete the message that triggered it, and its own
// response, after the specified amount of time has passed.
// Enable this if you don't want your channel to be flooded with bot messages.
// ATTENTION! In order for this to work, you need to give your bot the following permission:
// MANAGE_MESSAGES - 0x00002000
// More info: https://discordapp.com/developers/docs/topics/permissions
deleteAfterReply: {
enabled: false,
time: 10000 // In milliseconds
},
log: {
enable: true,
channel: 'bot-log'
},
ignoreOtherBotMessages: true,
rconReconnect: 30000, // Miliseconds to try reconnect, if server restart or somehow disconnected ( 30 000 = 30 sec )
loginAttempts: 20, // total login attempts every x seconds when connection is lost ( eg: when server restarts. )
specificLoaded: false,
specific: {
// eg: 256158903245471753
guildId: "256158903245471753", // Found @ Discord -> (Your server) Server Settings -> Widget -> Copy Server ID
channels: {
welcome: "welcome", // not used in this verson
goodbye: "welcome", // not used in this version
log: "bot-log" // to log all your technical bot messages.
},
watcher: [
{
active: false,
channel: 'bot-kill',
directory: 'logs/', // Can also be an absolute path (eg: "C:/Users/server/logs/" )
file: 'KillFeed_*.log', // Supports wilcard (*), this will check all the files with the given filter and takes the last modified one to monitor
// This is done so there can be log rotations in the same folder.
}
],
bercon: {
enabled: true,
colors: true,
servers: [
{
name: 'Zupa test server', // Just your
ip: '195.xx.xxx.xxx',
port: 2303,
rconPassword: 'yourpass',
timezone: 2, // must be number, if negative just put -2
rconCommand: '!rcon', // pretext for a command ex: !rcon say all welcome
sendMessagesAsEmbeds: true, // if false, bot posts as code block with coloring. If yes, visual crads with white/black text and channel color as left border.
embedColors: { // Hex color of the embed borders.
side: '#6ABEE7',
direct: '#959AA4',
vehicle: '#DBBD48',
group: '#3A8347',
admin: '#ff0000',
privateadmin: '#ff00ff',
default: '#ffffff',
commands: '#ffffff',
joins: '#92FA4D',
global: '#6ABEE7'
},
actions: [ // actions only for this server.
{
command: '!server ts', // Command that a player can type ingame
reply: 'We use discord!', // Bot response ingame
discordReply: '@Admin Someone asked for ts...', // Bot respone in discord. leave empty if not wanted.
role: 'rcon-admin' // role to mention in discord together with discordreply, leave '' if none.
}
],
channels: {
default: 'bot-text', // mandatory
side: 'bot-text',
direct: 'bot-text',
vehicle: 'bot-text',
group: 'bot-text',
admin: 'bot-text',
privateadmin: 'bot-text',
commands: 'bot-text',
joins: 'bot-text',
global: 'bot-text'
},
showChannels: {
side: true, // Arma only
direct: true, // Used in DayZ SA and arma ( In Dayz, these are part of global chat but filtered to separate stream )
vehicle: true, // Arma only
group: true, // Arma only
admin: true, // Used in DayZ SA and arma ( RCON chat that is private or join messages )
privateadmin: true, // Used in DayZ SA and arma ( Text that is sent via rcon to 1 person )
default: true, // Used in DayZ SA and arma ( Fallback for non-mapped messages if there are any )
commands: true, // Used in DayZ SA and arma ( Poeple with the role ( set a bit lower ) can use the given discord channel to type commands.
joins: true, // Used in DayZ SA and arma ( Join messages )
global: true // Used in DayZ SA and arma sometimes ( Global dayz chat )
},
jobs: [
{
time: '0 15 * * * *', // CRON Timer - google CRON
text: 'Enjoy your stay!', // Bot chat in game
}
]
}
],
sharedActions: [ // shared between all servers.
{
command: '!ts', // Command that a player can type ingame
reply: 'We use discord!', // Bot response ingame
discordReply: '@Admin Someone asked for ts...', // Bot respone in discord. leave empty if not wanted.
role: 'rcon-admin' // role to mention in discord together with discordreplt
},
{
command: '!discord',
reply: 'A nice discord link - Change this.',
discordReply: '',
role: ''
}
],
permissions: { // Discord role to be able to let an user use the rcon commands.
players: 'rcon-admin',
admins: 'rcon-admin',
bans: 'rcon-admin',
loadScripts: 'rcon-admin',
loadEvents: 'rcon-admin',
say: 'rcon-admin',
missions: 'rcon-admin',
version: 'rcon-admin',
update: 'rcon-admin',
loadBans: 'rcon-admin',
writeBans: 'rcon-admin',
removeBan: 'rcon-admin',
ban: 'rcon-admin',
addBan: 'rcon-admin',
MaxPing: 'rcon-admin',
kick: 'rcon-admin',
serverCommands: 'rcon-admin'
}
}
}
};