diff --git a/README.md b/README.md index 7c776b18..f2288beb 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ in the appropriate channel's topic to use it. ## Commands -Total: 479 +Total: 482 ### Utility: @@ -361,6 +361,7 @@ Total: 479 * **psycho-pass:** Determines your Crime Coefficient. * **ship:** Ships two users together. * **smash-or-pass:** Determines if a user is worthy of a smash or a pass. +* **thicc:** Determines how thicc you are. ### Single Response: @@ -375,6 +376,7 @@ Total: 479 * **its-joke:** It's joke! * **just-do-it:** Sends a link to the "Just Do It!" motivational speech. * **lenny:** Responds with the lenny face. +* **nitro:** Sends an image of a fake nitro giveaway. * **spam:** Responds with a picture of Spam. * **tableflip:** Flips a table... With animation! * **wynaut:** Why not? Wynaut? @@ -652,6 +654,7 @@ Total: 479 * **new-password:** Sends a "Weak Password/Strong Password" meme with the passwords of your choice. * **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. +* **pills:** Sends a "Hard to Swallow Pills" meme with the 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. @@ -1022,6 +1025,7 @@ here. * nike-ad ([Noto Font](https://www.google.com/get/noto/)) * periodic-table ([Noto Font](https://www.google.com/get/noto/)) * phoebe-teaching-joey ([Noto Font](https://www.google.com/get/noto/)) + * pills ([Noto Font](https://www.google.com/get/noto/)) * plankton-plan ([Noto Font](https://www.google.com/get/noto/)) * scroll-of-truth ([Noto Font](https://www.google.com/get/noto/)) * sos ([Noto Font](https://www.google.com/get/noto/)) @@ -1275,9 +1279,11 @@ here. * gun (Concept) * hentai (Original Subreddit List) * like (Concept) + * pills (Concept) * pogchamp (Concept) * porn (Original Subreddit List) * simp (Concept) + * thicc (Concept) * undertale (Concept) * worse-than-hitler (Concept) - [PAC-MAN Party](http://pacman.com/en/pac-man-games/pac-man-party) @@ -1469,6 +1475,8 @@ here. * waldo ([Concept](https://www.reddit.com/r/copypasta/comments/gkk7z1/wheres_waldo_game_created_by_me/)) - [u/LennyMcLennington](https://www.reddit.com/user/LennyMcLennington) * dark-light ([Image](https://www.reddit.com/r/discordapp/comments/8t04ag/this_image_shows_different_text_depending_on/)) +- [u/MoonlightCapital](https://www.reddit.com/user/MoonlightCapital/) + * nitro ([Image](https://www.reddit.com/r/discordapp/comments/a9fr7x/troll_your_friends_with_this/)) - [u/N1ffler](https://www.reddit.com/user/N1ffler/) * sorting-hat ([Sorting Hat Quiz Analysis Data](https://www.reddit.com/r/Pottermore/comments/44os14/pottermore_sorting_hat_quiz_analysis/)) - [u/SupremeMemesXD](https://www.reddit.com/user/SupremeMemesXD/) @@ -1501,6 +1509,8 @@ here. * phoebe-teaching-joey ([Images, Original "Friends" TV Series](https://www.warnerbros.com/tv/friends/)) - [Wattpad](https://www.wattpad.com/) * wattpad ([API](https://www.wattpad.com/developer/docs/api)) +- [Why We Protest](https://whyweprotest.net/) + * hat ([Anon Hat Image](https://whyweprotest.net/threads/big-ass-guy-fawkes-mask-images-thread.22719/)) - [wikiHow](https://www.wikihow.com/Main-Page) * wikihow ([API](https://www.wikihow.com/api.php)) - [Wikipedia](https://www.wikipedia.org/) diff --git a/assets/images/hat/anon.png b/assets/images/hat/anon.png new file mode 100644 index 00000000..86f495b7 Binary files /dev/null and b/assets/images/hat/anon.png differ diff --git a/assets/images/nitro.png b/assets/images/nitro.png new file mode 100644 index 00000000..e2198b4c Binary files /dev/null and b/assets/images/nitro.png differ diff --git a/assets/images/pills.png b/assets/images/pills.png new file mode 100644 index 00000000..192f1671 Binary files /dev/null and b/assets/images/pills.png differ diff --git a/assets/json/hat.json b/assets/json/hat.json index eea7f41f..2eb3ad1e 100644 --- a/assets/json/hat.json +++ b/assets/json/hat.json @@ -1,4 +1,5 @@ [ + "anon", "ash", "birthday", "christmas", diff --git a/commands/edit-avatar/hat.js b/commands/edit-avatar/hat.js index 1b2c8428..a45215b7 100644 --- a/commands/edit-avatar/hat.js +++ b/commands/edit-avatar/hat.js @@ -101,6 +101,12 @@ module.exports = class HatCommand extends Command { url: 'https://www.stickpng.com/', reason: 'Mask Hat Image', reasonURL: 'https://www.stickpng.com/img/science/pandemic/white-surgical-face-mask-front-view' + }, + { + name: 'Why We Protest', + url: 'https://whyweprotest.net/', + reason: 'Anon Hat Image', + reasonURL: 'https://whyweprotest.net/threads/big-ass-guy-fawkes-mask-images-thread.22719/' } ], args: [ diff --git a/commands/edit-meme/pills.js b/commands/edit-meme/pills.js new file mode 100644 index 00000000..00f3931a --- /dev/null +++ b/commands/edit-meme/pills.js @@ -0,0 +1,67 @@ +const Command = require('../../structures/Command'); +const { createCanvas, loadImage, registerFont } = require('canvas'); +const path = require('path'); +const { wrapText } = require('../../util/Canvas'); +registerFont(path.join(__dirname, '..', '..', 'assets', 'fonts', 'Noto-Regular.ttf'), { family: 'Noto' }); +registerFont(path.join(__dirname, '..', '..', 'assets', 'fonts', 'Noto-CJK.otf'), { family: 'Noto' }); +registerFont(path.join(__dirname, '..', '..', 'assets', 'fonts', 'Noto-Emoji.ttf'), { family: 'Noto' }); + +module.exports = class PillsCommand extends Command { + constructor(client) { + super(client, { + name: 'pills', + aliases: ['hard-to-swallow-pills', 'hard-pills'], + group: 'edit-meme', + memberName: 'pills', + description: 'Sends a "Hard to Swallow Pills" meme with the text of your choice.', + throttling: { + usages: 1, + duration: 10 + }, + clientPermissions: ['ATTACH_FILES'], + credit: [ + { + name: 'Overtime2005', + url: 'https://github.com/Overtime2005', + reason: 'Concept' + }, + { + name: 'Google', + url: 'https://www.google.com/', + reason: 'Noto Font', + reasonURL: 'https://www.google.com/get/noto/' + } + ], + args: [ + { + key: 'text', + prompt: 'What do you want to be hard to swallow?', + type: 'string', + max: 500 + } + ] + }); + } + + async run(msg, { text }) { + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'pills.png')); + const canvas = createCanvas(base.width, base.height); + const ctx = canvas.getContext('2d'); + ctx.drawImage(base, 0, 0); + ctx.textAlign = 'center'; + ctx.textBaseline = 'top'; + ctx.font = '32px Noto'; + let fontSize = 32; + while (ctx.measureText(text).width > 1260) { + fontSize--; + ctx.font = `${fontSize}px Noto`; + } + const lines = await wrapText(ctx, text, 280); + const topMost = 455 - (((fontSize * lines.length) / 2) + ((10 * (lines.length - 1)) / 2)); + for (let i = 0; i < lines.length; i++) { + const height = topMost + ((fontSize + 10) * i); + ctx.fillText(lines[i], 183, height); + } + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'pills.png' }] }); + } +}; diff --git a/commands/info/emoji-image.js b/commands/info/emoji-image.js index 492eaa96..ec10882f 100644 --- a/commands/info/emoji-image.js +++ b/commands/info/emoji-image.js @@ -14,7 +14,8 @@ module.exports = class EmojiImageCommand extends Command { { key: 'emoji', prompt: 'Which emoji would you like to get the image of?', - type: 'custom-emoji' + type: 'custom-emoji', + default: msg => msg.guild.emojis.cache.random() } ] }); diff --git a/commands/random-seed/thicc.js b/commands/random-seed/thicc.js new file mode 100644 index 00000000..424593f7 --- /dev/null +++ b/commands/random-seed/thicc.js @@ -0,0 +1,42 @@ +const Command = require('../../structures/Command'); +const { MersenneTwister19937, integer } = require('random-js'); + +module.exports = class ThiccCommand extends Command { + constructor(client) { + super(client, { + name: 'thicc', + aliases: ['thick'], + group: 'random-seed', + memberName: 'thicc', + description: 'Determines how thicc you are.', + args: [ + { + key: 'user', + prompt: 'What user do you want to determine the thiccness of?', + type: 'user', + default: msg => msg.author + } + ], + credit: [ + { + name: 'Overtime2005', + url: 'https://github.com/Overtime2005', + reason: 'Concept' + } + ] + }); + } + + run(msg, { user }) { + if (this.client.isOwner(user)) { + if (user.id === msg.author.id) return msg.reply(`You are thi${'c'.repeat(100)}`); + return msg.reply(`They are thi. Not even one c.`); + } + const clientAuthor = user.id === this.client.user.id; + const random = MersenneTwister19937.seed(clientAuthor ? msg.author.id : user.id); + const length = integer(0, 100)(random); + let pronoun = 'They'; + if (user.id === msg.author.id) pronoun = 'You' + return msg.reply(`${pronoun} are thi${'c'.repeat(clientAuthor ? length + 1 : length)}`); + } +}; diff --git a/commands/single/nitro.js b/commands/single/nitro.js new file mode 100644 index 00000000..f634db00 --- /dev/null +++ b/commands/single/nitro.js @@ -0,0 +1,27 @@ +const Command = require('../../structures/Command'); +const path = require('path'); + +module.exports = class NitroCommand extends Command { + constructor(client) { + super(client, { + name: 'nitro', + aliases: ['fake-nitro'], + group: 'single', + memberName: 'nitro', + description: 'Sends an image of a fake nitro giveaway.', + clientPermissions: ['ATTACH_FILES'], + url: [ + { + name: 'u/MoonlightCapital', + url: 'https://www.reddit.com/user/MoonlightCapital/', + reason: 'Image', + reasonURL: 'https://www.reddit.com/r/discordapp/comments/a9fr7x/troll_your_friends_with_this/' + } + ] + }); + } + + run(msg) { + return msg.say({ files: [path.join(__dirname, '..', '..', 'assets', 'images', 'nitro.png')] }); + } +}; diff --git a/package.json b/package.json index 7974e9e3..b4e9a620 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "116.22.0", + "version": "116.23.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {