Add the >>paddle command
This commit is contained in:
parent
9e2191a199
commit
44af9c4a4b
|
@ -1,6 +1,8 @@
|
||||||
const config = {
|
const config = {
|
||||||
BOT_TOKEN: 'YOUR_BOT_TOKEN_GOES_HERE',
|
BOT_TOKEN: 'YOUR_BOT_TOKEN_GOES_HERE',
|
||||||
CHANNELS_ALLOW: ['123456789012345678', '123456789012345678']
|
CHANNELS_ALLOW: ['123456789012345678', '123456789012345678'],
|
||||||
|
MOD_ROLE: '123456789012345678',
|
||||||
|
STAFF_ROLE: '123456789012345678'
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = config;
|
module.exports = config;
|
||||||
|
|
BIN
images/paddlin.jpg
Normal file
BIN
images/paddlin.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
BIN
images/paddlin_badge.png
Normal file
BIN
images/paddlin_badge.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 191 KiB |
BIN
images/paddlin_base.png
Normal file
BIN
images/paddlin_base.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
BIN
images/paddlin_emoji.png
Normal file
BIN
images/paddlin_emoji.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
13
index.js
13
index.js
|
@ -35,6 +35,18 @@ function sendOnline(status, channel) {
|
||||||
}
|
}
|
||||||
|
|
||||||
client.on('message', async msg => {
|
client.on('message', async msg => {
|
||||||
|
if ( msg.content.startsWith(">>paddle") ) {
|
||||||
|
console.log("Trying to paddle");
|
||||||
|
if ( msg.member.roles.cache.has(Config.MOD_ROLE) || msg.member.roles.cache.has(Config.STAFF_ROLE) ) {
|
||||||
|
let response = "";
|
||||||
|
msg.mentions.users.forEach(function (user) {
|
||||||
|
response += "<@" + user.id + "> ";
|
||||||
|
});
|
||||||
|
response += "Don't do bad things!";
|
||||||
|
msg.channel.send(response, { files: ["images/paddlin_badge.png"] });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( msg.content.startsWith(">>servers") && Config.CHANNELS_ALLOW.includes(msg.channel.id) ) {
|
if ( msg.content.startsWith(">>servers") && Config.CHANNELS_ALLOW.includes(msg.channel.id) ) {
|
||||||
let embed = new Discord.MessageEmbed()
|
let embed = new Discord.MessageEmbed()
|
||||||
.setTitle("Here's a list of our current servers...")
|
.setTitle("Here's a list of our current servers...")
|
||||||
|
@ -151,6 +163,7 @@ client.on('message', async msg => {
|
||||||
server.sendDetails(msg.channel, hostStatus, serverStatus, serverTPS);
|
server.sendDetails(msg.channel, hostStatus, serverStatus, serverTPS);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
connection.close();
|
||||||
} else {
|
} else {
|
||||||
console.log("No rcon settings for: " + server.name);
|
console.log("No rcon settings for: " + server.name);
|
||||||
server.sendDetails(msg.channel, hostStatus, serverStatus, serverTPS);
|
server.sendDetails(msg.channel, hostStatus, serverStatus, serverTPS);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user