Local Storage

This commit is contained in:
Daniel Odendahl Jr
2017-05-13 18:15:37 +00:00
parent 73ad340cb1
commit 82d3c6eeca
37 changed files with 113 additions and 135 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

-23
View File
@@ -1,23 +0,0 @@
[
"https://i.imgur.com/tyVciSC.png",
"https://i.imgur.com/dTGqFFe.jpg",
"https://i.imgur.com/bB1FpdZ.jpg",
"https://i.imgur.com/BuO0RHc.jpg",
"https://i.imgur.com/oXCxBSe.jpg",
"https://i.imgur.com/Wf6Kss3.jpg",
"https://i.imgur.com/OiFboDi.jpg",
"https://i.imgur.com/3Z56sKT.png",
"https://i.imgur.com/rBLuUPT.png",
"https://i.imgur.com/XSuTmzl.png",
"https://i.imgur.com/sBIo3oF.png",
"https://i.imgur.com/dcWMZnv.png",
"https://i.imgur.com/nh6kZjH.jpg",
"https://i.imgur.com/DbBeMgY.png",
"https://i.imgur.com/qaXCHLv.png",
"https://i.imgur.com/34itKmU.jpg",
"https://i.imgur.com/3pbBjxN.png",
"https://i.imgur.com/bKx1XuE.gif",
"https://i.imgur.com/iSVUORW.png",
"https://i.imgur.com/O2JLT8q.jpg",
"https://i.imgur.com/kEAj26f.jpg"
]
+3 -3
View File
@@ -28,7 +28,7 @@ module.exports = class YearsCommand extends Command {
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args; const { user } = args;
const avatarURL = user.avatarURL('png', 2048); const avatarURL = user.avatarURL('png', 256);
if (!avatarURL) return msg.say('This user has no avatar.'); if (!avatarURL) return msg.say('This user has no avatar.');
try { try {
const Image = Canvas.Image; const Image = Canvas.Image;
@@ -41,8 +41,8 @@ module.exports = class YearsCommand extends Command {
ctx.drawImage(avatar, 461, 127, 200, 200); ctx.drawImage(avatar, 461, 127, 200, 200);
}; };
base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', '3000years.png')); base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', '3000years.png'));
const avatarImg = await request.get(avatarURL); const { body } = await request.get(avatarURL);
avatar.src = avatarImg.body; avatar.src = body;
generate(); generate();
return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'az.png' }] }) return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'az.png' }] })
.catch(err => msg.say(err)); .catch(err => msg.say(err));
+3 -3
View File
@@ -28,7 +28,7 @@ module.exports = class BeautifulCommand extends Command {
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args; const { user } = args;
const avatarURL = user.avatarURL('png', 2048); const avatarURL = user.avatarURL('png', 256);
if (!avatarURL) return msg.say('This user has no avatar.'); if (!avatarURL) return msg.say('This user has no avatar.');
try { try {
const Image = Canvas.Image; const Image = Canvas.Image;
@@ -42,8 +42,8 @@ module.exports = class BeautifulCommand extends Command {
ctx.drawImage(avatar, 343, 301, 117, 135); ctx.drawImage(avatar, 343, 301, 117, 135);
}; };
base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'beautiful.png')); base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'beautiful.png'));
const avatarImg = await request.get(avatarURL); const { body } = await request.get(avatarURL);
avatar.src = avatarImg.body; avatar.src = body;
generate(); generate();
return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'grunkle.png' }] }) return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'grunkle.png' }] })
.catch(err => msg.say(err)); .catch(err => msg.say(err));
+4 -4
View File
@@ -28,7 +28,7 @@ module.exports = class BobRossCommand extends Command {
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args; const { user } = args;
const avatarURL = user.avatarURL('png', 2048); const avatarURL = user.avatarURL('png', 256);
if (!avatarURL) return msg.say('This user has no avatar.'); if (!avatarURL) return msg.say('This user has no avatar.');
try { try {
const Image = Canvas.Image; const Image = Canvas.Image;
@@ -40,13 +40,13 @@ module.exports = class BobRossCommand extends Command {
ctx.fillStyle = 'white'; ctx.fillStyle = 'white';
ctx.fillRect(0, 0, 600, 775); ctx.fillRect(0, 0, 600, 775);
ctx.rotate(3 * Math.PI / 180); ctx.rotate(3 * Math.PI / 180);
ctx.drawImage(avatar, 50, 80, 300, 300); ctx.drawImage(avatar, 69, 102, 256, 256);
ctx.rotate(-3 * Math.PI / 180); ctx.rotate(-3 * Math.PI / 180);
ctx.drawImage(base, 0, 0); ctx.drawImage(base, 0, 0);
}; };
base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'bobross.png')); base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'bobross.png'));
const avatarImg = await request.get(avatarURL); const { body } = await request.get(avatarURL);
avatar.src = avatarImg.body; avatar.src = body;
generate(); generate();
return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'ross.png' }] }) return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'ross.png' }] })
.catch(err => msg.say(err)); .catch(err => msg.say(err));
+3 -3
View File
@@ -35,7 +35,7 @@ module.exports = class CardCommand extends Command {
if (cardID < 5000) rarity = 'C'; if (cardID < 5000) rarity = 'C';
else if (cardID < 8000) rarity = 'U'; else if (cardID < 8000) rarity = 'U';
else rarity = 'R'; else rarity = 'R';
const avatarURL = member.user.avatarURL('png', 2048); const avatarURL = member.user.avatarURL('png', 512);
if (!avatarURL) return msg.say('This user has no avatar.'); if (!avatarURL) return msg.say('This user has no avatar.');
try { try {
const Image = Canvas.Image; const Image = Canvas.Image;
@@ -64,8 +64,8 @@ module.exports = class CardCommand extends Command {
ctx.fillText(`#${member.user.discriminator}`, 313, 355); ctx.fillText(`#${member.user.discriminator}`, 313, 355);
}; };
base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'card.png')); base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'card.png'));
const avatarImg = await request.get(avatarURL); const { body } = await request.get(avatarURL);
avatar.src = avatarImg.body; avatar.src = body;
generate(); generate();
return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'card.png' }] }) return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'card.png' }] })
.catch(err => msg.say(err)); .catch(err => msg.say(err));
+4 -4
View File
@@ -25,16 +25,16 @@ module.exports = class GreyscaleCommand extends Command {
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args; const { user } = args;
const avatarURL = user.avatarURL('png', 2048); const avatarURL = user.avatarURL('png', 256);
if (!avatarURL) return msg.say('This user has no avatar.'); if (!avatarURL) return msg.say('This user has no avatar.');
try { try {
const Image = Canvas.Image; const Image = Canvas.Image;
const canvas = new Canvas(500, 500); const canvas = new Canvas(256, 256);
const ctx = canvas.getContext('2d'); const ctx = canvas.getContext('2d');
const avatar = new Image(); const avatar = new Image();
const generate = () => { const generate = () => {
ctx.drawImage(avatar, 0, 0, 500, 500); ctx.drawImage(avatar, 0, 0, 256, 256);
const imgData = ctx.getImageData(0, 0, 500, 500); const imgData = ctx.getImageData(0, 0, 256, 256);
const data = imgData.data; const data = imgData.data;
for (let i = 0; i < data.length; i += 4) { for (let i = 0; i < data.length; i += 4) {
const brightness = 0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2]; const brightness = 0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2];
+4 -4
View File
@@ -24,16 +24,16 @@ module.exports = class InvertCommand extends Command {
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args; const { user } = args;
const avatarURL = user.avatarURL('png', 2048); const avatarURL = user.avatarURL('png', 256);
if (!avatarURL) return msg.say('This user has no avatar.'); if (!avatarURL) return msg.say('This user has no avatar.');
try { try {
const Image = Canvas.Image; const Image = Canvas.Image;
const canvas = new Canvas(500, 500); const canvas = new Canvas(256, 256);
const ctx = canvas.getContext('2d'); const ctx = canvas.getContext('2d');
const avatar = new Image(); const avatar = new Image();
const generate = () => { const generate = () => {
ctx.drawImage(avatar, 0, 0, 500, 500); ctx.drawImage(avatar, 0, 0, 256, 256);
const imgData = ctx.getImageData(0, 0, 500, 500); const imgData = ctx.getImageData(0, 0, 256, 256);
const data = imgData.data; const data = imgData.data;
for (let i = 0; i < data.length; i += 4) { for (let i = 0; i < data.length; i += 4) {
data[i] = 255 - data[i]; data[i] = 255 - data[i];
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class RIPCommand extends Command {
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args; const { user } = args;
const avatarURL = user.avatarURL('png', 2048); const avatarURL = user.avatarURL('png', 256);
if (!avatarURL) return msg.say('This User has no Avatar.'); if (!avatarURL) return msg.say('This User has no Avatar.');
try { try {
const Image = Canvas.Image; const Image = Canvas.Image;
+3 -3
View File
@@ -28,7 +28,7 @@ module.exports = class SteamCardCommand extends Command {
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args; const { user } = args;
const username = msg.guild ? (msg.guild.member(user) ? msg.guild.member(user).displayName : user.username) : user.username; const username = msg.guild ? (msg.guild.member(user) ? msg.guild.member(user).displayName : user.username) : user.username;
const avatarURL = user.avatarURL('png', 2048); const avatarURL = user.avatarURL('png', 512);
if (!avatarURL) return msg.say('This user has no avatar.'); if (!avatarURL) return msg.say('This user has no avatar.');
try { try {
const Image = Canvas.Image; const Image = Canvas.Image;
@@ -46,8 +46,8 @@ module.exports = class SteamCardCommand extends Command {
ctx.fillText(username, 35, 48); ctx.fillText(username, 35, 48);
}; };
base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'steamcard.png')); base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'steamcard.png'));
const avatarImg = await request.get(avatarURL); const { body } = await request.get(avatarURL);
avatar.src = avatarImg.body; avatar.src = body;
generate(); generate();
return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'card.png' }] }) return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'card.png' }] })
.catch(err => msg.say(err)); .catch(err => msg.say(err));
+3 -3
View File
@@ -27,7 +27,7 @@ module.exports = class TriggeredCommand extends Command {
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args; const { user } = args;
const avatarURL = user.avatarURL('png', 2048); const avatarURL = user.avatarURL('png', 512);
if (!avatarURL) return msg.say('This user has no avatar.'); if (!avatarURL) return msg.say('This user has no avatar.');
try { try {
const Image = Canvas.Image; const Image = Canvas.Image;
@@ -48,8 +48,8 @@ module.exports = class TriggeredCommand extends Command {
ctx.drawImage(base, 0, 0); ctx.drawImage(base, 0, 0);
}; };
base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'triggered.png')); base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'triggered.png'));
const avatarImg = await request.get(avatarURL); const { body } = await request.get(avatarURL);
avatar.src = avatarImg.body; avatar.src = body;
generate(); generate();
return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'triggered.png' }] }) return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'triggered.png' }] })
.catch(err => msg.say(err)); .catch(err => msg.say(err));
+3 -3
View File
@@ -27,7 +27,7 @@ module.exports = class WantedCommand extends Command {
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
const { user } = args; const { user } = args;
const avatarURL = user.avatarURL('png', 2048); const avatarURL = user.avatarURL('png', 512);
if (!avatarURL) return msg.say('This user has no avatar.'); if (!avatarURL) return msg.say('This user has no avatar.');
try { try {
const Image = Canvas.Image; const Image = Canvas.Image;
@@ -40,8 +40,8 @@ module.exports = class WantedCommand extends Command {
ctx.drawImage(avatar, 150, 360, 430, 430); ctx.drawImage(avatar, 150, 360, 430, 430);
}; };
base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'wanted.png')); base.src = await fs.readFileAsync(path.join(__dirname, '..', '..', 'assets', 'images', 'wanted.png'));
const avatarImg = await request.get(avatarURL); const { body } = await request.get(avatarURL);
avatar.src = avatarImg.body; avatar.src = body;
generate(); generate();
return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'wanted.png' }] }) return msg.channel.send({ files: [{ attachment: canvas.toBuffer(), name: 'wanted.png' }] })
.catch(err => msg.say(err)); .catch(err => msg.say(err));
+9 -9
View File
@@ -22,22 +22,22 @@ module.exports = class GuildInfoCommand extends Command {
const embed = new RichEmbed() const embed = new RichEmbed()
.setColor(0x00AE86) .setColor(0x00AE86)
.setThumbnail(msg.guild.iconURL()) .setThumbnail(msg.guild.iconURL())
.addField('**Name:**', .addField('Name',
msg.guild.name, true) msg.guild.name, true)
.addField('**ID:**', .addField('ID',
msg.guild.id, true) msg.guild.id, true)
.addField('**Created On:**', .addField('Creation Date',
stripIndents` stripIndents`
${msg.guild.createdAt} ${moment(msg.guild.createdTimestamp).format('MMMM Do YYYY h:mm:ss A')}
${moment.duration(Date.now() - msg.guild.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago. ${moment.duration(Date.now() - msg.guild.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.
`, true) `, true)
.addField('**Default Channel:**', .addField('Default Channel',
msg.guild.defaultChannel, true) msg.guild.defaultChannel, true)
.addField('**Region:**', .addField('Region',
msg.guild.region, true) msg.guild.region, true)
.addField('**Owner:**', .addField('Owner',
msg.guild.owner.user.tag, true) msg.guild.owner, true)
.addField('**Users:**', .addField('Members',
msg.guild.memberCount, true); msg.guild.memberCount, true);
return msg.embed(embed); return msg.embed(embed);
} }
+2 -1
View File
@@ -1,4 +1,5 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const path = require('path');
module.exports = class SpamCommand extends Command { module.exports = class SpamCommand extends Command {
constructor(client) { constructor(client) {
@@ -14,7 +15,7 @@ module.exports = class SpamCommand extends Command {
if (msg.channel.type !== 'dm') if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
return msg.channel.send({ files: ['https://i.imgur.com/2JFu5xE.jpg'] }) return msg.channel.send({ files: [path.join(__dirname, '..', '..', 'assets', 'images', 'spam.png')] })
.catch(err => msg.say(err)); .catch(err => msg.say(err));
} }
}; };
+3 -3
View File
@@ -1,5 +1,5 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const xiaos = require('../../assets/json/xiaopai'); const path = require('path');
module.exports = class XiaoCommand extends Command { module.exports = class XiaoCommand extends Command {
constructor(client) { constructor(client) {
@@ -16,8 +16,8 @@ module.exports = class XiaoCommand extends Command {
if (msg.channel.type !== 'dm') if (msg.channel.type !== 'dm')
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES')) if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
return msg.say('This Command requires the `Attach Files` Permission.'); return msg.say('This Command requires the `Attach Files` Permission.');
const xiao = xiaos[Math.floor(Math.random() * xiaos.length)]; const xiao = Math.floor(Math.random() * 10) + 1;
return msg.channel.send({ files: [xiao] }) return msg.channel.send({ files: [path.join(__dirname, '..', '..', 'assets', 'images', `xiaopai${xiao}.png`)] })
.catch(err => msg.say(err)); .catch(err => msg.say(err));
} }
}; };
+3 -3
View File
@@ -35,11 +35,11 @@ module.exports = class BotSearchCommand extends Command {
.setTitle(body.name) .setTitle(body.name)
.setURL(`https://bots.discord.pw/bots/${bot.id}`) .setURL(`https://bots.discord.pw/bots/${bot.id}`)
.setDescription(body.description) .setDescription(body.description)
.addField('**Library:**', .addField('Library',
body.library, true) body.library, true)
.addField('**Invite:**', .addField('Invite',
`[Here](${body.invite_url})`, true) `[Here](${body.invite_url})`, true)
.addField('**Prefix:**', .addField('Prefix',
body.prefix, true); body.prefix, true);
return msg.embed(embed); return msg.embed(embed);
} catch (err) { } catch (err) {
+7 -7
View File
@@ -34,19 +34,19 @@ module.exports = class ForecastCommand extends Command {
.setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png') .setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png')
.setURL(body.query.results.channel.link) .setURL(body.query.results.channel.link)
.setTimestamp() .setTimestamp()
.addField(`**${forecasts[0].day} - ${forecasts[0].date}:**`, .addField(`${forecasts[0].day} - ${forecasts[0].date}`,
`**High:** ${forecasts[0].high}°F, **Low:** ${forecasts[0].low}°F, **Condition:** ${forecasts[0].text}`) `**High:** ${forecasts[0].high}°F, **Low:** ${forecasts[0].low}°F, **Condition:** ${forecasts[0].text}`)
.addField(`**${forecasts[1].day} - ${forecasts[1].date}:**`, .addField(`${forecasts[1].day} - ${forecasts[1].date}`,
`**High:** ${forecasts[1].high}°F, **Low:** ${forecasts[1].low}°F, **Condition:** ${forecasts[1].text}`) `**High:** ${forecasts[1].high}°F, **Low:** ${forecasts[1].low}°F, **Condition:** ${forecasts[1].text}`)
.addField(`**${forecasts[2].day} - ${forecasts[2].date}:**`, .addField(`${forecasts[2].day} - ${forecasts[2].date}`,
`**High:** ${forecasts[2].high}°F, **Low:** ${forecasts[2].low}°F, **Condition:** ${forecasts[2].text}`) `**High:** ${forecasts[2].high}°F, **Low:** ${forecasts[2].low}°F, **Condition:** ${forecasts[2].text}`)
.addField(`**${forecasts[3].day} - ${forecasts[3].date}:**`, .addField(`${forecasts[3].day} - ${forecasts[3].date}`,
`**High:** ${forecasts[3].high}°F, **Low:** ${forecasts[3].low}°F, **Condition:** ${forecasts[3].text}`) `**High:** ${forecasts[3].high}°F, **Low:** ${forecasts[3].low}°F, **Condition:** ${forecasts[3].text}`)
.addField(`**${forecasts[4].day} - ${forecasts[4].date}:**`, .addField(`${forecasts[4].day} - ${forecasts[4].date}`,
`**High:** ${forecasts[4].high}°F, **Low:** ${forecasts[4].low}°F, **Condition:** ${forecasts[4].text}`) `**High:** ${forecasts[4].high}°F, **Low:** ${forecasts[4].low}°F, **Condition:** ${forecasts[4].text}`)
.addField(`**${forecasts[5].day} - ${forecasts[5].date}:**`, .addField(`${forecasts[5].day} - ${forecasts[5].date}`,
`**High:** ${forecasts[5].high}°F, **Low:** ${forecasts[5].low}°F, **Condition:** ${forecasts[5].text}`) `**High:** ${forecasts[5].high}°F, **Low:** ${forecasts[5].low}°F, **Condition:** ${forecasts[5].text}`)
.addField(`**${forecasts[6].day} - ${forecasts[6].date}:**`, .addField(`${forecasts[6].day} - ${forecasts[6].date}`,
`**High:** ${forecasts[6].high}°F, **Low:** ${forecasts[6].low}°F, **Condition:** ${forecasts[6].text}`); `**High:** ${forecasts[6].high}°F, **Low:** ${forecasts[6].low}°F, **Condition:** ${forecasts[6].text}`);
return msg.embed(embed); return msg.embed(embed);
} catch (err) { } catch (err) {
+7 -7
View File
@@ -35,19 +35,19 @@ module.exports = class IMDBCommand extends Command {
.setURL(`http://www.imdb.com/title/${body.imdbID}`) .setURL(`http://www.imdb.com/title/${body.imdbID}`)
.setTitle(`${body.Title} (${body.imdbRating} Score)`) .setTitle(`${body.Title} (${body.imdbRating} Score)`)
.setDescription(body.Plot.substr(0, 2000)) .setDescription(body.Plot.substr(0, 2000))
.addField('**Genres:**', .addField('Genres',
body.Genre) body.Genre)
.addField('**Year:**', .addField('Year',
body.Year, true) body.Year, true)
.addField('**Rated:**', .addField('Rated',
body.Rated, true) body.Rated, true)
.addField('**Runtime:**', .addField('Runtime',
body.Runtime, true) body.Runtime, true)
.addField('**Directors:**', .addField('Directors',
body.Director) body.Director)
.addField('**Writers:**', .addField('Writers',
body.Writer) body.Writer)
.addField('**Actors:**', .addField('Actors',
body.Actors); body.Actors);
return msg.embed(embed); return msg.embed(embed);
} catch (err) { } catch (err) {
+12 -12
View File
@@ -34,29 +34,29 @@ module.exports = class OsuCommand extends Command {
.setColor(0xFF66AA) .setColor(0xFF66AA)
.setAuthor('osu!', 'https://i.imgur.com/EmnUp00.png') .setAuthor('osu!', 'https://i.imgur.com/EmnUp00.png')
.setURL('https://osu.ppy.sh/') .setURL('https://osu.ppy.sh/')
.addField('**Username:**', .addField('Username',
body[0].username, true) body[0].username, true)
.addField('**ID:**', .addField('ID',
body[0].user_id, true) body[0].user_id, true)
.addField('**Level:**', .addField('Level',
body[0].level, true) body[0].level, true)
.addField('**Accuracy**', .addField('Accuracy',
body[0].accuracy, true) body[0].accuracy, true)
.addField('**Rank:**', .addField('Rank',
body[0].pp_rank, true) body[0].pp_rank, true)
.addField('**Play Count:**', .addField('Play Count',
body[0].playcount, true) body[0].playcount, true)
.addField('**Country:**', .addField('Country',
body[0].country, true) body[0].country, true)
.addField('**Ranked Score:**', .addField('Ranked Score',
body[0].ranked_score, true) body[0].ranked_score, true)
.addField('**Total Score:**', .addField('Total Score',
body[0].total_score, true) body[0].total_score, true)
.addField('**SS:**', .addField('SS',
body[0].count_rank_ss, true) body[0].count_rank_ss, true)
.addField('**S:**', .addField('S',
body[0].count_rank_s, true) body[0].count_rank_s, true)
.addField('**A:**', .addField('A',
body[0].count_rank_a, true); body[0].count_rank_a, true);
return msg.embed(embed); return msg.embed(embed);
} catch (err) { } catch (err) {
+5 -5
View File
@@ -36,15 +36,15 @@ module.exports = class SoundCloudCommand extends Command {
.setTitle(body[0].title) .setTitle(body[0].title)
.setURL(body[0].permalink_url) .setURL(body[0].permalink_url)
.setThumbnail(body[0].artwork_url) .setThumbnail(body[0].artwork_url)
.addField('**Artist:**', .addField('Artist',
body[0].user.username) body[0].user.username)
.addField('**Download Count:**', .addField('Download Count',
body[0].download_count, true) body[0].download_count, true)
.addField('**Comment Count**', .addField('Comment Count',
body[0].comment_count, true) body[0].comment_count, true)
.addField('**Playback Count:**', .addField('Playback Count',
body[0].playback_count, true) body[0].playback_count, true)
.addField('**Favorited Count:**', .addField('Favorited Count',
body[0].favoritings_count, true); body[0].favoritings_count, true);
return msg.embed(embed); return msg.embed(embed);
} catch (err) { } catch (err) {
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = class UrbanCommand extends Command {
.setURL(body.list[0].permalink) .setURL(body.list[0].permalink)
.setTitle(body.list[0].word) .setTitle(body.list[0].word)
.setDescription(body.list[0].definition.substr(0, 2000)) .setDescription(body.list[0].definition.substr(0, 2000))
.addField('**Example:**', .addField('Example',
body.list[0].example.substr(0, 2000) || 'None'); body.list[0].example.substr(0, 2000) || 'None');
return msg.embed(embed); return msg.embed(embed);
} catch (err) { } catch (err) {
+6 -6
View File
@@ -37,17 +37,17 @@ module.exports = class WattpadCommand extends Command {
.setURL(body.stories[0].url) .setURL(body.stories[0].url)
.setTitle(body.stories[0].title) .setTitle(body.stories[0].title)
.setDescription(body.stories[0].description.substr(0, 2000)) .setDescription(body.stories[0].description.substr(0, 2000))
.addField('**Author:**', .addField('Author',
body.stories[0].user, true) body.stories[0].user, true)
.addField('**Parts:**', .addField('Parts',
body.stories[0].numParts, true) body.stories[0].numParts, true)
.addField('**Created On:**', .addField('Created On',
body.stories[0].createDate, true) body.stories[0].createDate, true)
.addField('**Votes:**', .addField('Votes',
body.stories[0].voteCount, true) body.stories[0].voteCount, true)
.addField('**Reads:**', .addField('Reads',
body.stories[0].readCount, true) body.stories[0].readCount, true)
.addField('**Comments:**', .addField('Comments',
body.stories[0].commentCount, true); body.stories[0].commentCount, true);
return msg.embed(embed); return msg.embed(embed);
} catch (err) { } catch (err) {
+12 -12
View File
@@ -33,29 +33,29 @@ module.exports = class WeatherCommand extends Command {
.setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png') .setAuthor(body.query.results.channel.title, 'https://i.imgur.com/2MT0ViC.png')
.setURL(body.query.results.channel.link) .setURL(body.query.results.channel.link)
.setTimestamp() .setTimestamp()
.addField('**City:**', .addField('City',
body.query.results.channel.location.city, true) body.query.results.channel.location.city, true)
.addField('**Country**', .addField('Country',
body.query.results.channel.location.country, true) body.query.results.channel.location.country, true)
.addField('**Region:**', .addField('Region',
body.query.results.channel.location.region, true) body.query.results.channel.location.region, true)
.addField('**Condition:**', .addField('Condition',
body.query.results.channel.item.condition.text, true) body.query.results.channel.item.condition.text, true)
.addField('**Temperature:**', .addField('Temperature',
`${body.query.results.channel.item.condition.temp}°F`, true) `${body.query.results.channel.item.condition.temp}°F`, true)
.addField('**Humidity:**', .addField('Humidity',
body.query.results.channel.atmosphere.humidity, true) body.query.results.channel.atmosphere.humidity, true)
.addField('**Pressure:**', .addField('Pressure',
body.query.results.channel.atmosphere.pressure, true) body.query.results.channel.atmosphere.pressure, true)
.addField('**Rising:**', .addField('Rising',
body.query.results.channel.atmosphere.rising, true) body.query.results.channel.atmosphere.rising, true)
.addField('**Visibility:**', .addField('Visibility',
body.query.results.channel.atmosphere.visibility, true) body.query.results.channel.atmosphere.visibility, true)
.addField('**Wind Chill:**', .addField('Wind Chill',
body.query.results.channel.wind.chill, true) body.query.results.channel.wind.chill, true)
.addField('**Wind Direction:**', .addField('Wind Direction',
body.query.results.channel.wind.direction, true) body.query.results.channel.wind.direction, true)
.addField('**Wind Speed:**', .addField('Wind Speed',
body.query.results.channel.wind.speed, true); body.query.results.channel.wind.speed, true);
return msg.embed(embed); return msg.embed(embed);
} catch (err) { } catch (err) {
+7 -7
View File
@@ -35,17 +35,17 @@ module.exports = class YuGiOhCommand extends Command {
.setTitle(body.data.name) .setTitle(body.data.name)
.setDescription(body.data.text) .setDescription(body.data.text)
.setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/7gPm9Rr.png') .setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/7gPm9Rr.png')
.addField('**Card Type:**', .addField('Card Type',
body.data.card_type, true) body.data.card_type, true)
.addField('**Type:**', .addField('Type',
body.data.type, true) body.data.type, true)
.addField('**Attribute:**', .addField('Attribute',
body.data.family, true) body.data.family, true)
.addField('**ATK:**', .addField('ATK',
body.data.atk, true) body.data.atk, true)
.addField('**DEF:**', .addField('DEF',
body.data.def, true) body.data.def, true)
.addField('**Level:**', .addField('Level',
body.data.level, true); body.data.level, true);
return msg.embed(embed); return msg.embed(embed);
} else { } else {
@@ -54,7 +54,7 @@ module.exports = class YuGiOhCommand extends Command {
.setTitle(body.data.name) .setTitle(body.data.name)
.setDescription(body.data.text) .setDescription(body.data.text)
.setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/7gPm9Rr.png') .setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/7gPm9Rr.png')
.addField('**Card Type:**', .addField('Card Type',
body.data.card_type, true); body.data.card_type, true);
return msg.embed(embed); return msg.embed(embed);
} }
+6 -6
View File
@@ -51,23 +51,23 @@ module.exports = class UserInfoCommand extends Command {
const embed = new RichEmbed() const embed = new RichEmbed()
.setColor(color) .setColor(color)
.setThumbnail(member.user.displayAvatarURL) .setThumbnail(member.user.displayAvatarURL)
.addField('**Name:**', .addField('Name',
member.user.tag, true) member.user.tag, true)
.addField('**ID:**', .addField('ID',
member.id, true) member.id, true)
.addField('**Joined Discord On:**', .addField('Discord Join Date',
stripIndents` stripIndents`
${moment(member.user.createdTimestamp).format('MMMM Do YYYY h:mm:ss A')} ${moment(member.user.createdTimestamp).format('MMMM Do YYYY h:mm:ss A')}
${moment.duration(Date.now() - member.user.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago. ${moment.duration(Date.now() - member.user.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.
`) `)
.addField('**Joined Server On:**', .addField('Server Join Date',
stripIndents` stripIndents`
${moment(member.joinedTimestamp).format('MMMM Do YYYY h:mm:ss A')} ${moment(member.joinedTimestamp).format('MMMM Do YYYY h:mm:ss A')}
${moment.duration(Date.now() - member.joinedTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago. ${moment.duration(Date.now() - member.joinedTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago.
`) `)
.addField('**Status:**', .addField('Status',
stat, true) stat, true)
.addField('**Playing:**', .addField('Playing',
member.user.presence.game ? member.user.presence.game.name : 'None', true); member.user.presence.game ? member.user.presence.game.name : 'None', true);
return msg.embed(embed); return msg.embed(embed);
} }
+1 -1
View File
@@ -37,7 +37,7 @@ module.exports = class HelpCommand extends Command {
${commands[0].details || ''} ${commands[0].details || ''}
`); `);
} else if (commands.length > 1) { } else if (commands.length > 1) {
return msg.say(`Multiple Commands Found. Please be more specific: ${commands.map(c => `"${c.name}"`).join(', ')}`); return msg.say(`Multiple Commands Found. Please be more specific: ${commands.map(c => c.name).join(', ')}`);
} else { } else {
return msg.say(`Could not identify command. Use ${msg.usage(null)} to view a list of commands you can use.`); return msg.say(`Could not identify command. Use ${msg.usage(null)} to view a list of commands you can use.`);
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "xiaobot", "name": "xiaobot",
"version": "19.3.1", "version": "19.3.2",
"description": "A Discord Bot", "description": "A Discord Bot",
"main": "shardingmanager.js", "main": "shardingmanager.js",
"scripts": { "scripts": {