From 452bede9036af8db1b25f8c21939e22626db380a Mon Sep 17 00:00:00 2001 From: Alee Date: Mon, 21 Oct 2019 20:31:12 +0000 Subject: Prefix is now in a json file and new command --- commands/Getting Started/help.js | 3 ++- commands/Utility/hinfo.js | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 commands/Utility/hinfo.js (limited to 'commands') diff --git a/commands/Getting Started/help.js b/commands/Getting Started/help.js index 4ee6ce5..1fb2101 100644 --- a/commands/Getting Started/help.js +++ b/commands/Getting Started/help.js @@ -10,11 +10,12 @@ exports.run = (bot, msg, args) => { const { RichEmbed } = require('discord.js'); if (!args[0]) { + const settings = require("../../assets/settings.json"); const embed = new RichEmbed(); embed .setColor (0x36393e) .setTitle('PokeBot Command List') - .setDescription('PokeBot prefix is `p:`.') + .setDescription(`PokeBot prefix is \`${settings.prefix}\`.`) .setFooter(`PokeBot v1.0 is on ${bot.guilds.size} servers.`); const categories = Array.from(bot.categories.keys()); diff --git a/commands/Utility/hinfo.js b/commands/Utility/hinfo.js new file mode 100644 index 0000000..982a3bf --- /dev/null +++ b/commands/Utility/hinfo.js @@ -0,0 +1,31 @@ +/** ************************************** + * + * Host Info: Plugin for PokeBot that provides the information of the host. + * Copyright (C) 2018 TheEdge, jtsshieh, Alee + * + * Licensed under the Open Software License version 3.0 + * + * *************************************/ + +exports.run = (bot, msg) => { + const { RichEmbed } = require('discord.js'); + const os = require('os'); + const embed = new RichEmbed() + .setTitle('Information on PokeBot\'s Host') + .addField('OS Hostname: ', os.hostname() , true) + .addField('NodeJS Version: ', process.versions.node , true) + .addField('OS Platform: ', os.platform() , true) + .addField('OS Version: ', os.release() , true) + .setColor('#000000'); + msg.channel.send({embed}); +}; + +exports.conf = { + aliases: [], + guildOnly: true, +}; + +exports.help = { + name: 'hinfo', + description: 'Gives host information to user.', +}; -- cgit v1.2.3