diff --git a/README.md b/README.md index 730935ac..2fd1abc6 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ in the appropriate channel's topic to use it. ## Commands -Total: 475 +Total: 476 ### Utility: @@ -650,6 +650,7 @@ Total: 475 * **nike-ad:** Sends a "Believe in Something" Nike Ad meme with the text of your choice. * **phoebe-teaching-joey:** Sends a "Phoebe Teaching Joey" meme with text of your choice. * **plankton-plan:** Sends a Plankton's Plan meme with steps of your choice. +* **pogchamp:** Sends a pogchamp duplicated however many times you want. * **scroll-of-truth:** Sends a "Scroll of Truth" meme with the text of your choice. * **skyrim-skill:** Sends a "Skyrim Skill" meme with the skill and image of your choice. * **sora-selfie:** Draws an image or a user's avatar behind Sora taking a selfie. @@ -1257,6 +1258,7 @@ here. * dislike (Concept) * hentai (Original Subreddit List) * like (Concept) + * pogchamp (Concept) * porn (Original Subreddit List) * simp (Concept) * worse-than-hitler (Concept) @@ -1346,6 +1348,8 @@ here. * rotten-tomatoes (API) - [rrrather](https://www.rrrather.com/) * would-you-rather ([API](https://www.rrrather.com/botapi)) +- [Ryan Gutierrez](https://twitter.com/gootecks) + * pogchamp (Image) - [Safebooru](https://safebooru.org/) * safebooru (API) - [Serebii.net](https://www.serebii.net/index2.shtml) diff --git a/assets/images/pogchamp.png b/assets/images/pogchamp.png new file mode 100644 index 00000000..b3fba51d Binary files /dev/null and b/assets/images/pogchamp.png differ diff --git a/commands/edit-meme/pogchamp.js b/commands/edit-meme/pogchamp.js new file mode 100644 index 00000000..7e827f62 --- /dev/null +++ b/commands/edit-meme/pogchamp.js @@ -0,0 +1,56 @@ +const Command = require('../../structures/Command'); +const { createCanvas, loadImage } = require('canvas'); +const path = require('path'); + +module.exports = class PogchampCommand extends Command { + constructor(client) { + super(client, { + name: 'pogchamp', + aliases: ['pog'], + group: 'edit-meme', + memberName: 'pogchamp', + description: 'Sends a pogchamp duplicated however many times you want.', + throttling: { + usages: 1, + duration: 30 + }, + clientPermissions: ['ATTACH_FILES'], + credit: [ + { + name: 'Ryan Gutierrez', + url: 'https://twitter.com/gootecks', + reason: 'Image' + }, + { + name: 'Overtime2005', + url: 'https://github.com/Overtime2005', + reason: 'Concept' + } + ], + args: [ + { + key: 'amount', + prompt: 'How many times do you want to duplicate the pogchamp?', + type: 'integer', + max: 100, + min: 1 + } + ] + }); + } + + async run(msg, { amount }) { + const pog = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'pogchamp.png')); + const rows = Math.ceil(amount / 10); + const canvas = createCanvas(pog.width * (rows > 1 ? 10 : amount), pog.height * rows); + const ctx = canvas.getContext('2d'); + let width = 0; + for (let i = 0; i < amount; i++) { + const row = Math.ceil((i + 1) / 10); + ctx.drawImage(pog, width, pog.height * (row - 1)); + if ((width + pog.width) === (pog.width * (rows > 1 ? 10 : amount))) width = 0; + else width += pog.width; + } + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'pogchamp.png' }] }); + } +}; diff --git a/package.json b/package.json index 5dfdd046..ce0acb10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "116.18.0", + "version": "116.19.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {