Added basic functionality

This commit is contained in:
plane000
2018-05-20 01:18:47 +01:00
parent 9523cd874a
commit 5a764b0a71
8 changed files with 193 additions and 21 deletions

27
commands/commands.js Normal file
View File

@@ -0,0 +1,27 @@
const Discord = require('discord.js');
const ping = require('ping');
const fs = require('fs');
const Config = require('../config');
/*message object, messaage full, message args, discord client*/
module.exports.say = function(message, msg, args, discordclient) {
}
module.exports.version = function(message, msg, args, discordclient) {
var em = new Discord.RichEmbed();
em.setColor('BLUE');
em.setTitle('Version:');
em.setDescription(Config.getconfig().Version);
message.channel.send(em);
return;
}
module.exports.ping = function(message, msg, args, discordclient) {
ping.promise.probe("discordapp.com", {
timeout: 10
}).then((output) => {
message.channel.send(`:white_check_mark: \`${output.avg}ms\``);
});
}