mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 06:42:51 +02:00
Remove useless aliases, bug fixes
This commit is contained in:
@@ -7,7 +7,7 @@ module.exports = class ThreeThousandYearsCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: '3000-years',
|
||||
aliases: ['az', '3ky', '3k-years'],
|
||||
aliases: ['3ky', '3k-years'],
|
||||
group: 'avatar-edit',
|
||||
memberName: '3000-years',
|
||||
description: 'Draws a user\'s avatar over Pokémon\'s "It\'s been 3000 years" meme.',
|
||||
|
||||
@@ -3,13 +3,13 @@ const { createCanvas, loadImage } = require('canvas');
|
||||
const request = require('node-superfetch');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = class ThisIsBeautifulCommand extends Command {
|
||||
module.exports = class BeautifulCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'this-is-beautiful',
|
||||
aliases: ['beautiful', 'grunkle-stan'],
|
||||
name: 'beautiful',
|
||||
aliases: ['this-is-beautiful', 'grunkle-stan'],
|
||||
group: 'avatar-edit',
|
||||
memberName: 'this-is-beautiful',
|
||||
memberName: 'beautiful',
|
||||
description: 'Draws a user\'s avatar over Gravity Falls\' "Oh, this? This is beautiful." meme.',
|
||||
throttling: {
|
||||
usages: 1,
|
||||
@@ -30,7 +30,7 @@ module.exports = class ThisIsBeautifulCommand extends Command {
|
||||
async run(msg, { user }) {
|
||||
const avatarURL = user.displayAvatarURL({ format: 'png', size: 128 });
|
||||
try {
|
||||
const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'this-is-beautiful.png'));
|
||||
const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'beautiful.png'));
|
||||
const { body } = await request.get(avatarURL);
|
||||
const avatar = await loadImage(body);
|
||||
const canvas = createCanvas(base.width, base.height);
|
||||
@@ -40,7 +40,7 @@ module.exports = class ThisIsBeautifulCommand extends Command {
|
||||
ctx.drawImage(avatar, 249, 24, 105, 105);
|
||||
ctx.drawImage(avatar, 249, 223, 105, 105);
|
||||
ctx.drawImage(base, 0, 0);
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'this-is-beautiful.png' }] });
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'beautiful.png' }] });
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
@@ -7,7 +7,7 @@ module.exports = class DrakepostingCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'drakeposting',
|
||||
aliases: ['drake', 'nah-yeah', 'naw-yeah'],
|
||||
aliases: ['drake'],
|
||||
group: 'avatar-edit',
|
||||
memberName: 'drakeposting',
|
||||
description: 'Draws two user\'s avatars over the "Drakeposting" meme.',
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = class LookAtThisPhotographCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'look-at-this-photograph',
|
||||
aliases: ['photo', 'nickelback', 'look-at-this-photo', 'photograph'],
|
||||
aliases: ['nickelback', 'look-at-this-photo', 'photograph'],
|
||||
group: 'avatar-edit',
|
||||
memberName: 'look-at-this-photograph',
|
||||
description: 'Draws a user\'s avatar over Nickelback\'s photograph.',
|
||||
|
||||
@@ -10,7 +10,7 @@ module.exports = class SteamCardCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'steam-card',
|
||||
aliases: ['valve-card', 'card', 'discord-card'],
|
||||
aliases: ['valve-card'],
|
||||
group: 'avatar-edit',
|
||||
memberName: 'steam-card',
|
||||
description: 'Draws a user\'s avatar on a Steam Trading Card.',
|
||||
|
||||
@@ -8,6 +8,7 @@ module.exports = class TriggeredCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'triggered',
|
||||
aliases: ['trigger'],
|
||||
group: 'avatar-edit',
|
||||
memberName: 'triggered',
|
||||
description: 'Draws a user\'s avatar over the "Triggered" meme.',
|
||||
|
||||
+6
-6
@@ -3,13 +3,13 @@ const { createCanvas, loadImage } = require('canvas');
|
||||
const request = require('node-superfetch');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = class TheUltimateTattooCommand extends Command {
|
||||
module.exports = class UltimateTattooCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'the-ultimate-tattoo',
|
||||
aliases: ['ultimate-tattoo', 'tattoo'],
|
||||
name: 'ultimate-tattoo',
|
||||
aliases: ['the-ultimate-tattoo', 'tattoo'],
|
||||
group: 'avatar-edit',
|
||||
memberName: 'the-ultimate-tattoo',
|
||||
memberName: 'ultimate-tattoo',
|
||||
description: 'Draws a user\'s avatar as "The Ultimate Tattoo".',
|
||||
throttling: {
|
||||
usages: 1,
|
||||
@@ -30,7 +30,7 @@ module.exports = class TheUltimateTattooCommand extends Command {
|
||||
async run(msg, { user }) {
|
||||
const avatarURL = user.displayAvatarURL({ format: 'png', size: 256 });
|
||||
try {
|
||||
const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'the-ultimate-tattoo.png'));
|
||||
const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'ultimate-tattoo.png'));
|
||||
const { body } = await request.get(avatarURL);
|
||||
const avatar = await loadImage(body);
|
||||
const canvas = createCanvas(base.width, base.height);
|
||||
@@ -39,7 +39,7 @@ module.exports = class TheUltimateTattooCommand extends Command {
|
||||
ctx.rotate(-10 * (Math.PI / 180));
|
||||
ctx.drawImage(avatar, 84, 690, 300, 300);
|
||||
ctx.rotate(10 * (Math.PI / 180));
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'the-ultimate-tattoo.png' }] });
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'ultimate-tattoo.png' }] });
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
@@ -3,13 +3,13 @@ const { createCanvas, loadImage } = require('canvas');
|
||||
const request = require('node-superfetch');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = class ThisIsWorthlessCommand extends Command {
|
||||
module.exports = class WorthlessCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'this-is-worthless',
|
||||
aliases: ['worthless'],
|
||||
name: 'worthless',
|
||||
aliases: ['this-is-worthless'],
|
||||
group: 'avatar-edit',
|
||||
memberName: 'this-is-worthless',
|
||||
memberName: 'worthless',
|
||||
description: 'Draws a user\'s avatar over Gravity Falls\' "Oh, this? This is worthless." meme.',
|
||||
throttling: {
|
||||
usages: 1,
|
||||
@@ -30,7 +30,7 @@ module.exports = class ThisIsWorthlessCommand extends Command {
|
||||
async run(msg, { user }) {
|
||||
const avatarURL = user.displayAvatarURL({ format: 'png', size: 512 });
|
||||
try {
|
||||
const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'this-is-worthless.png'));
|
||||
const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'worthless.png'));
|
||||
const { body } = await request.get(avatarURL);
|
||||
const avatar = await loadImage(body);
|
||||
const canvas = createCanvas(base.width, base.height);
|
||||
@@ -39,7 +39,7 @@ module.exports = class ThisIsWorthlessCommand extends Command {
|
||||
ctx.rotate(6 * (Math.PI / 180));
|
||||
ctx.drawImage(avatar, 496, 183, 400, 400);
|
||||
ctx.rotate(-6 * (Math.PI / 180));
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'this-is-worthless.png' }] });
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'worthless.png' }] });
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
Reference in New Issue
Block a user