diff --git a/README.md b/README.md index fa37af95..cfd24a6d 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ in the appropriate channel's topic to use it. ## Commands -Total: 503 +Total: 504 ### Utility: @@ -640,6 +640,7 @@ Total: 503 * **bart-chalkboard:** Sends a "Bart Chalkboard" meme with the text of your choice. * **be-like-bill:** Sends a "Be Like Bill" meme with the name of your choice. * **beautiful:** Draws a user's avatar over Gravity Falls' "Oh, this? This is beautiful." meme. +* **boardroom-meeting:** Sends a "Boardroom Meeting" meme with the text of your choice. * **catch:** Catch users, revealing who is something. * **challenger:** Draws an image or a user's avatar over Smash Bros.'s "Challenger Approaching" screen. * **change-my-mind:** Sends a "Change My Mind" meme with the text of your choice. @@ -1036,6 +1037,7 @@ here. - [Go Nintendo](https://gonintendo.com/) * hat ([Ash Hat Image](https://gonintendo.com/stories/306292)) - [Google](https://www.google.com/) + * boardroom-meeting ([Noto Font](https://www.google.com/get/noto/)) * book ([Books API](https://developers.google.com/books/)) * calendar ([Calendar API](https://developers.google.com/calendar/)) * catch ([Noto Font](https://www.google.com/get/noto/)) @@ -1093,6 +1095,8 @@ here. * scrabble-score ([Original "Scrabble" Game](https://scrabble.hasbro.com/en-us)) - [hbl917070](https://github.com/hbl917070) * axis-cult-sign-up ([Font](https://github.com/hbl917070/Konosuba-text)) +- [hejibits](https://hejibits.com/) + * boardroom-meeting ([Image](https://web.archive.org/web/20121226235748/https://hejibits.com/comics/outlook-oust/)) - [Hollywood Walk of Fame](https://walkoffame.com/) * hollywood-star (Concept) - [Horst Faas](https://en.wikipedia.org/wiki/Horst_Faas) @@ -1319,6 +1323,7 @@ here. * osu ([API](https://github.com/ppy/osu-api/wiki)) - [Overtime2005](https://github.com/Overtime2005) * alert (Concept) + * boardroom-meeting (Concept) * dislike (Concept) * gun (Concept) * hands (Concept) diff --git a/assets/images/boardroom-meeting.png b/assets/images/boardroom-meeting.png new file mode 100644 index 00000000..2c3e3a91 Binary files /dev/null and b/assets/images/boardroom-meeting.png differ diff --git a/commands/edit-meme/boardroom-meeting.js b/commands/edit-meme/boardroom-meeting.js new file mode 100644 index 00000000..49abfdfb --- /dev/null +++ b/commands/edit-meme/boardroom-meeting.js @@ -0,0 +1,85 @@ +const Command = require('../../structures/Command'); +const { createCanvas, loadImage, registerFont } = require('canvas'); +const path = require('path'); +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 BoardroomMeetingCommand extends Command { + constructor(client) { + super(client, { + name: 'boardroom-meeting', + aliases: ['boardroom-suggestion', 'boardroom'], + group: 'edit-meme', + memberName: 'boardroom-meeting', + description: 'Sends a "Boardroom Meeting" meme with the text of your choice.', + throttling: { + usages: 1, + duration: 10 + }, + clientPermissions: ['ATTACH_FILES'], + credit: [ + { + name: 'hejibits', + url: 'https://hejibits.com/', + reason: 'Image', + reasonURL: 'https://web.archive.org/web/20121226235748/https://hejibits.com/comics/outlook-oust/' + }, + { + name: 'Google', + url: 'https://www.google.com/', + reason: 'Noto Font', + reasonURL: 'https://www.google.com/get/noto/' + }, + { + name: 'Overtime2005', + url: 'https://github.com/Overtime2005', + reason: 'Concept' + } + ], + args: [ + { + key: 'question', + prompt: 'What question should the meeting leader ask?', + type: 'string', + max: 100 + }, + { + key: 'suggestion1', + label: 'first suggestion', + prompt: 'What should the first employee suggest?', + type: 'string', + max: 50 + }, + { + key: 'suggestion2', + label: 'second suggestion', + prompt: 'What should the second employee suggest?', + type: 'string', + max: 50 + }, + { + key: 'final', + label: 'final suggestion', + prompt: 'What should the employee who gets thrown out the window suggest?', + type: 'string', + max: 50 + } + ] + }); + } + + async run(msg, { question, suggestion1, suggestion2, final }) { + const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'boardroom-meeting.png')); + const canvas = createCanvas(base.width, base.height); + const ctx = canvas.getContext('2d'); + ctx.drawImage(base, 0, 0); + ctx.font = '25px Noto'; + ctx.fillText(question, 153, 8, 300); + ctx.font = '15px Noto'; + ctx.fillText(suggestion1, 30, 251, 90); + ctx.fillText(suggestion2, 167, 258, 75); + ctx.fillText(final, 310, 269, 130); + return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'boardroom-meeting.png' }] }); + } +}; diff --git a/package.json b/package.json index 039d377a..d7ff728f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "116.40.1", + "version": "116.41.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {