String Changes, Don't register tons of defaults

This commit is contained in:
Daniel Odendahl Jr
2017-04-05 17:27:31 +00:00
parent f380a3ecbd
commit 332016ca5d
75 changed files with 225 additions and 265 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
const commando = require('discord.js-commando');
module.exports = class CanYouNot extends commando.Command {
module.exports = class CanYouNotCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'canyounot',
+4 -4
View File
@@ -18,11 +18,11 @@ module.exports = class NitroCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
const embed = new Discord.RichEmbed()
.setAuthor("Discord Nitro")
.setThumbnail("https://pbs.twimg.com/profile_images/814184180649197568/y2eZcVMq.jpg")
.setAuthor('Discord Nitro')
.setThumbnail('https://pbs.twimg.com/profile_images/814184180649197568/y2eZcVMq.jpg')
.setColor(0x748BD9)
.setURL("https://discordapp.com/nitro")
.setDescription("This Message can only be viewed by members with Discord Nitro.\n\n\n[More Information](https://discordapp.com/nitro)");
.setURL('https://discordapp.com/nitro')
.setDescription('This Message can only be viewed by members with Discord Nitro.\n\n[More Information](https://discordapp.com/nitro)');
return message.embed(embed);
}
};
-43
View File
@@ -1,43 +0,0 @@
const commando = require('discord.js-commando');
const moment = require('moment');
const sherlock = require('Sherlock');
module.exports = class RemindCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'remind',
aliases: [
'remindme'
],
group: 'random',
memberName: 'remind',
description: 'Reminds you of something at a certain time. (;remind Eat Food tomorrow)',
examples: [';remind Eat Food tomorrow'],
args: [{
key: 'remind',
prompt: 'What should I remind you of?',
type: 'string'
}]
});
}
async run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
const remindMe = args.remind;
try {
const remindTime = sherlock.parse(remindMe);
const time = remindTime.startDate.getTime() - Date.now();
const preRemind = await message.say(`I will remind you '${remindTime.eventTitle}' ${moment().add(time, 'ms').fromNow()}.`);
const remindMessage = await new Promise(resolve => {
setTimeout(() => resolve(message.say(`${message.author} you wanted me to remind you of: '${remindTime.eventTitle}'`)), time);
});
return [preRemind, remindMessage];
}
catch (err) {
return message.say(":x: Error! Something went wrong! Perhaps you didn't enter a valid time with your data?");
}
}
};
+2 -2
View File
@@ -1,5 +1,5 @@
const commando = require('discord.js-commando');
const sounds = ['cat', 'pikachu', 'vader', 'doh', "it's a trap", 'mario death', 'pokemon center', 'dun dun dun', 'spongebob', 'ugly barnacle', 'woo hoo', 'space', 'glados bird', 'airhorn', 'zelda chest', 'eat my shorts', 'no this is patrick', 'wumbo'];
const sounds = ['cat', 'pikachu', 'vader', 'doh', 'it\'s a trap', 'mario death', 'pokemon center', 'dun dun dun', 'spongebob', 'ugly barnacle', 'woo hoo', 'space', 'glados bird', 'airhorn', 'zelda chest', 'eat my shorts', 'no this is patrick', 'wumbo'];
const paths = {
"cat": "./sounds/cat.mp3",
"pikachu": "./sounds/pikachu.mp3",
@@ -32,7 +32,7 @@ module.exports = class SoundBoardCommand extends commando.Command {
group: 'random',
memberName: 'soundboard',
description: 'Plays a sound in your voice channel. (;soundboard cat)',
details: "**Sounds:** Cat, Pikachu, Vader, Doh, It's a Trap, Mario Death, Pokemon Center, Dun Dun Dun, Spongebob, Ugly Barnacle, Woo Hoo, Space, GLaDOS Bird, Airhorn, Zelda Chest, Eat my Shorts, No This is Patrick, Wumbo",
details: '**Sounds:** Cat, Pikachu, Vader, Doh, It\'s a Trap, Mario Death, Pokemon Center, Dun Dun Dun, Spongebob, Ugly Barnacle, Woo Hoo, Space, GLaDOS Bird, Airhorn, Zelda Chest, Eat my Shorts, No This is Patrick, Wumbo',
examples: [';soundboard cat'],
guildOnly: true,
args: [{
+1 -1
View File
@@ -16,6 +16,6 @@ module.exports = class SpamCommand extends commando.Command {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
}
console.log(`[Command] ${message.content}`);
return message.channel.sendFile("./images/Spam.jpg");
return message.channel.sendFile('./images/Spam.jpg');
}
};
+5 -5
View File
@@ -12,7 +12,7 @@ module.exports = class StrawpollCommand extends commando.Command {
group: 'random',
memberName: 'strawpoll',
description: 'Creates a Strawpoll with your options. (;strawpoll "Who likes chips?" Me | Not Me)',
examples: [';;strawpoll "Who likes chips?" Me | Not Me'],
examples: [';strawpoll "Who likes chips?" Me | Not Me'],
args: [{
key: 'title',
prompt: 'What would you like the title of the Strawpoll to be? Surround in "" for multiple words.',
@@ -25,7 +25,7 @@ module.exports = class StrawpollCommand extends commando.Command {
}
}, {
key: 'choices',
prompt: 'What choices do you want me pick from? Split them with " | "!',
prompt: 'What choices do you want me pick from? Split them with " | ".',
type: 'string',
validate: content => {
if (content.includes(' | ')) {
@@ -34,7 +34,7 @@ module.exports = class StrawpollCommand extends commando.Command {
if (content.length > 160) {
return 'Please limit your options to 160 characters.';
}
return 'Please split your choices with " | ".';
return 'Please split your choices with ' | '.';
}
}]
});
@@ -46,7 +46,7 @@ module.exports = class StrawpollCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
const title = args.title;
const choices = args.choices.split(" | ");
const choices = args.choices.split(' | ');
if (choices.length < 2) return message.say(':x: Error! You provided less than two choices!');
if (choices.length > 31) return message.say(':x: Error! You provided more than thirty choices!');
try {
@@ -60,7 +60,7 @@ module.exports = class StrawpollCommand extends commando.Command {
return message.say(`${data.title}\nhttp://strawpoll.me/${data.id}`);
}
catch (err) {
return message.say(":x: Error! Something went wrong!");
return message.say(':x: Error! Something went wrong!');
}
}
};
+2 -2
View File
@@ -20,7 +20,7 @@ module.exports = class TodayCommand extends commando.Command {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
console.log('[Command] ' + message.content);
try {
const response = await request
.get('http://history.muffinlabs.com/date')
@@ -40,7 +40,7 @@ module.exports = class TodayCommand extends commando.Command {
return message.embed(embed);
}
catch (err) {
return message.say(":x: Error! Something went wrong!");
return message.say(':x: Error! Something went wrong!');
}
}
};