mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 00:12:32 +02:00
Boardroom Meeting Command
This commit is contained in:
@@ -227,7 +227,7 @@ in the appropriate channel's topic to use it.
|
|||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
Total: 503
|
Total: 504
|
||||||
|
|
||||||
### Utility:
|
### Utility:
|
||||||
|
|
||||||
@@ -640,6 +640,7 @@ Total: 503
|
|||||||
* **bart-chalkboard:** Sends a "Bart Chalkboard" meme with the text of your choice.
|
* **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.
|
* **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.
|
* **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.
|
* **catch:** Catch users, revealing who is something.
|
||||||
* **challenger:** Draws an image or a user's avatar over Smash Bros.'s "Challenger Approaching" screen.
|
* **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.
|
* **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/)
|
- [Go Nintendo](https://gonintendo.com/)
|
||||||
* hat ([Ash Hat Image](https://gonintendo.com/stories/306292))
|
* hat ([Ash Hat Image](https://gonintendo.com/stories/306292))
|
||||||
- [Google](https://www.google.com/)
|
- [Google](https://www.google.com/)
|
||||||
|
* boardroom-meeting ([Noto Font](https://www.google.com/get/noto/))
|
||||||
* book ([Books API](https://developers.google.com/books/))
|
* book ([Books API](https://developers.google.com/books/))
|
||||||
* calendar ([Calendar API](https://developers.google.com/calendar/))
|
* calendar ([Calendar API](https://developers.google.com/calendar/))
|
||||||
* catch ([Noto Font](https://www.google.com/get/noto/))
|
* 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))
|
* scrabble-score ([Original "Scrabble" Game](https://scrabble.hasbro.com/en-us))
|
||||||
- [hbl917070](https://github.com/hbl917070)
|
- [hbl917070](https://github.com/hbl917070)
|
||||||
* axis-cult-sign-up ([Font](https://github.com/hbl917070/Konosuba-text))
|
* 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 Walk of Fame](https://walkoffame.com/)
|
||||||
* hollywood-star (Concept)
|
* hollywood-star (Concept)
|
||||||
- [Horst Faas](https://en.wikipedia.org/wiki/Horst_Faas)
|
- [Horst Faas](https://en.wikipedia.org/wiki/Horst_Faas)
|
||||||
@@ -1319,6 +1323,7 @@ here.
|
|||||||
* osu ([API](https://github.com/ppy/osu-api/wiki))
|
* osu ([API](https://github.com/ppy/osu-api/wiki))
|
||||||
- [Overtime2005](https://github.com/Overtime2005)
|
- [Overtime2005](https://github.com/Overtime2005)
|
||||||
* alert (Concept)
|
* alert (Concept)
|
||||||
|
* boardroom-meeting (Concept)
|
||||||
* dislike (Concept)
|
* dislike (Concept)
|
||||||
* gun (Concept)
|
* gun (Concept)
|
||||||
* hands (Concept)
|
* hands (Concept)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 348 KiB |
@@ -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' }] });
|
||||||
|
}
|
||||||
|
};
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "116.40.1",
|
"version": "116.41.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user