summaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/avatarurl.js14
-rw-r--r--commands/git.js14
-rw-r--r--commands/help.js41
-rw-r--r--commands/ping.js14
4 files changed, 83 insertions, 0 deletions
diff --git a/commands/avatarurl.js b/commands/avatarurl.js
new file mode 100644
index 0000000..fce4e00
--- /dev/null
+++ b/commands/avatarurl.js
@@ -0,0 +1,14 @@
+module.exports.run = async (client, message) => {
+ message.reply(message.author.avatarURL);
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'avatarurl',
+ description: 'Displays your avatar.',
+ usage: 'avatarurl',
+ category: '- General Commands',
+};
diff --git a/commands/git.js b/commands/git.js
new file mode 100644
index 0000000..8f9f18a
--- /dev/null
+++ b/commands/git.js
@@ -0,0 +1,14 @@
+module.exports.run = async (client, message) => {
+ message.channel.send ("Here's the github repo: https://github.com/Alee14/Oswald/");
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'git',
+ description: 'Shows the repo of Oswald.',
+ usage: 'git',
+ category: '- General Commands',
+}; \ No newline at end of file
diff --git a/commands/help.js b/commands/help.js
new file mode 100644
index 0000000..bc9c385
--- /dev/null
+++ b/commands/help.js
@@ -0,0 +1,41 @@
+const Discord = require('discord.js');
+const fs = require('fs');
+module.exports.run = async (client, message) => {
+ const categories = [];
+ const commands = Array.from(client.commands.keys());
+
+ commands.forEach(function(x) {
+ if (!categories.includes(client.commands.get(x).help.category)) {
+ categories.push(client.commands.get(x).help.category);
+ }
+ });
+
+ const embed = new Discord.RichEmbed()
+ .setAuthor(`Oswald Help and on ${client.guilds.size} servers`, client.avatarURL)
+ .setDescription('Every command you input into AleeBot is `oswald:`')
+ .setColor('#1fd619')
+ .setFooter('Alee14 Copyright 2018, Licensed with GPL-3.0');
+
+ categories.forEach(function(x) {
+ let cat = '';
+ commands.forEach(function(command) {
+ if (client.commands.get(command).help.category == x) {
+ cat = cat + command + '\n';
+ }
+ });
+ embed.addField(x, cat, true);
+ });
+
+ await message.channel.send({ embed });
+};
+
+exports.conf = {
+ aliases: ['h'],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'help',
+ description: 'Displays all the commands or a page with information for 1 command.',
+ usage: 'help (command:command-name)',
+ category: '- General Commands',
+};
diff --git a/commands/ping.js b/commands/ping.js
new file mode 100644
index 0000000..5ad82fd
--- /dev/null
+++ b/commands/ping.js
@@ -0,0 +1,14 @@
+module.exports.run = async (client, message) => {
+ message.reply('**PONG!** :ping_pong: ' + Math.round(client.ping) + ' ms');
+};
+
+exports.conf = {
+ aliases: [],
+ guildOnly: false,
+};
+exports.help = {
+ name: 'ping',
+ description: 'Displays the ping of the bot.',
+ usage: 'ping',
+ category: '- General Commands',
+};