aboutsummaryrefslogtreecommitdiff
path: root/commands/Utility
diff options
context:
space:
mode:
authorUnknown <jtsshieh@outlook.com>2018-02-24 14:59:35 -0500
committerUnknown <jtsshieh@outlook.com>2018-02-24 14:59:35 -0500
commitc484753ee15dbe2a5ce9c6297f22fabb52ce3b7e (patch)
tree93fd74f30abbd3c8206321b9d9c20b2571ed84ca /commands/Utility
parent3d36bcf0591f2694c3a2472a157ecca0de8d35fc (diff)
downloadPokeBot-c484753ee15dbe2a5ce9c6297f22fabb52ce3b7e.tar.gz
PokeBot-c484753ee15dbe2a5ce9c6297f22fabb52ce3b7e.tar.bz2
PokeBot-c484753ee15dbe2a5ce9c6297f22fabb52ce3b7e.zip
New Command system
Diffstat (limited to 'commands/Utility')
-rw-r--r--commands/Utility/suggest.js24
-rw-r--r--commands/Utility/uptime.js24
2 files changed, 48 insertions, 0 deletions
diff --git a/commands/Utility/suggest.js b/commands/Utility/suggest.js
new file mode 100644
index 0000000..831d222
--- /dev/null
+++ b/commands/Utility/suggest.js
@@ -0,0 +1,24 @@
+exports.run = (bot, msg, args) => {
+ const { RichEmbed } = require('discord.js');
+ bot.channels.get('416726932927938570').send(
+ new RichEmbed()
+ .setColor (0x00ae86)
+ .setTitle('Suggestion')
+ .setDescription('This is a suggestion from a community member for something relating to the server. Please rate it based on your opinion, and a staff member will decide what to do with the suggestion.')
+ .addField('Suggestion Contents', args.join(' '))
+ ).then(message => {
+ message.react('\u2705');
+ message.react('\u274E');
+ });
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: true,
+};
+
+exports.help = {
+ name: 'suggest',
+ description: 'Suggest a feature for the bot or the server.',
+ usage: '<...suggestion>',
+};
diff --git a/commands/Utility/uptime.js b/commands/Utility/uptime.js
new file mode 100644
index 0000000..63bd6a4
--- /dev/null
+++ b/commands/Utility/uptime.js
@@ -0,0 +1,24 @@
+exports.run = (bot, msg) => {
+ let uptime = parseInt(bot.uptime);
+ uptime = Math.floor(uptime / 1000);
+ let uptimeMinutes = Math.floor(uptime / 60);
+ const minutes = uptime % 60;
+ let hours = 0;
+ while (uptimeMinutes >= 60) {
+ hours++;
+ uptimeMinutes = uptimeMinutes - 60;
+ }
+ const uptimeSeconds = minutes % 60;
+ msg.channel.send(':clock3: Pokebot has been up for ' + hours + ' hours, ' + uptimeMinutes + ' minutes, and ' + uptimeSeconds + ' seconds.');
+
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: true,
+};
+
+exports.help = {
+ name: 'uptime',
+ description: 'Get the uptime of the bot.',
+};