Spongebob Time Card Command
@@ -224,7 +224,7 @@ in the appropriate channel's topic to use it.
|
||||
|
||||
## Commands
|
||||
|
||||
Total: 441
|
||||
Total: 442
|
||||
|
||||
### Utility:
|
||||
|
||||
@@ -555,6 +555,7 @@ Total: 441
|
||||
* **silhouette:** Draws a silhouette of an image or a user's avatar.
|
||||
* **simp:** Draws a "simp" stamp over an image or a user's avatar.
|
||||
* **snapcode:** Responds with the Snapcode of a Snapchat user.
|
||||
* **spongebob-time-card:** Sends a Spongebob Time Card with the text of your choice.
|
||||
* **square:** Draws an image or a user's avatar as a square.
|
||||
* **squish:** Draws an image or a user's avatar but squished across the X or Y axis.
|
||||
* **tint:** Draws an image or a user's avatar but tinted a specific color.
|
||||
@@ -1143,6 +1144,8 @@ here.
|
||||
* dec-talk ([Original "Moonbase Alpha" Game](https://store.steampowered.com/app/39000/Moonbase_Alpha/))
|
||||
* gravity ([Planet Gravity Data](https://nssdc.gsfc.nasa.gov/planetary/factsheet/planet_table_ratio.html))
|
||||
* nasa ([NASA Image and Video Library API](https://api.nasa.gov/))
|
||||
- [nauticalspongeinc](https://www.fontspace.com/nauticalspongeinc)
|
||||
* spongebob-time-card ([Spongeboytt1 Font](https://www.fontspace.com/spongeboytt1-font-f29761))
|
||||
- [National Suicide Prevention Lifeline](https://suicidepreventionlifeline.org/)
|
||||
* suicide-hotline (Phone Number)
|
||||
- [Neko Atsume: Kitty Collector](http://nekoatsume.com/en/)
|
||||
@@ -1158,6 +1161,7 @@ here.
|
||||
* magic-conch ([Original "Spongebob Squarepants" Show](https://www.nick.com/shows/spongebob-squarepants))
|
||||
* plankton-plan ([Image, Original "Spongebob Squarepants" Show](https://www.nick.com/shows/spongebob-squarepants))
|
||||
* spongebob-burn ([Image, Original "Spongebob Squarepants" Show](https://www.nick.com/shows/spongebob-squarepants))
|
||||
* spongebob-time-card ([Original "Spongebob Squarepants" Show](https://www.nick.com/shows/spongebob-squarepants))
|
||||
- [Nike](https://www.nike.com/)
|
||||
* nike-ad (Logo, Concept)
|
||||
- [Nintendo](https://www.nintendo.com/)
|
||||
@@ -1288,6 +1292,8 @@ here.
|
||||
* spam (Image)
|
||||
- [speak lolcat](https://speaklolcat.com/)
|
||||
* lolcat (Translation Data)
|
||||
- [Spongebob Fanon](https://spongebob-new-fanon.fandom.com/wiki/SpongeBob_Fanon_Wiki)
|
||||
* spongebob-time-card ([Images](https://spongebob-new-fanon.fandom.com/wiki/Gallery_of_Textless_Title_Cards))
|
||||
- [Square Enix](https://square-enix-games.com/)
|
||||
* nobody-name ([Original "Kingdom Hearts" Game](https://www.kingdomhearts.com/home/us/))
|
||||
* sora-selfie ([Original "Kingdom Hearts" Game](https://www.kingdomhearts.com/home/us/))
|
||||
|
||||
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 4.5 MiB |
|
After Width: | Height: | Size: 3.8 MiB |
|
After Width: | Height: | Size: 5.4 MiB |
|
After Width: | Height: | Size: 2.4 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 547 KiB |
|
After Width: | Height: | Size: 4.8 MiB |
|
After Width: | Height: | Size: 3.8 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 4.4 MiB |
|
After Width: | Height: | Size: 3.2 MiB |
|
After Width: | Height: | Size: 2.5 MiB |
|
After Width: | Height: | Size: 2.5 MiB |
|
After Width: | Height: | Size: 2.7 MiB |
|
After Width: | Height: | Size: 5.9 MiB |
|
After Width: | Height: | Size: 3.0 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 3.0 MiB |
|
After Width: | Height: | Size: 5.3 MiB |
@@ -0,0 +1,72 @@
|
||||
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', 'Spongeboytt1.otf'), { family: 'Spongeboytt1' });
|
||||
|
||||
module.exports = class SpongebobTimeCardCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'spongebob-time-card',
|
||||
aliases: ['time-card', 'sb-time-card', 'spongebob-card', 'sb-card', 'sponge-card', 'sponge-time-card'],
|
||||
group: 'edit-image',
|
||||
memberName: 'spongebob-time-card',
|
||||
description: 'Sends a Spongebob Time Card with the text of your choice.',
|
||||
throttling: {
|
||||
usages: 1,
|
||||
duration: 10
|
||||
},
|
||||
clientPermissions: ['ATTACH_FILES'],
|
||||
credit: [
|
||||
{
|
||||
name: 'Nickelodeon',
|
||||
url: 'https://www.nick.com/',
|
||||
reason: 'Original "Spongebob Squarepants" Show'
|
||||
},
|
||||
{
|
||||
name: 'Spongebob Fanon',
|
||||
url: 'https://spongebob-new-fanon.fandom.com/wiki/SpongeBob_Fanon_Wiki',
|
||||
reason: 'Images',
|
||||
reasonURL: 'https://spongebob-new-fanon.fandom.com/wiki/Gallery_of_Textless_Title_Cards'
|
||||
},
|
||||
{
|
||||
name: 'nauticalspongeinc',
|
||||
url: 'https://www.fontspace.com/nauticalspongeinc',
|
||||
reason: 'Spongeboytt1 Font',
|
||||
reasonURL: 'https://www.fontspace.com/spongeboytt1-font-f29761'
|
||||
}
|
||||
],
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What should the text of the time card be?',
|
||||
type: 'string',
|
||||
max: 280
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { text }) {
|
||||
const canvas = createCanvas(1920, 1080);
|
||||
const ctx = canvas.getContext('2d');
|
||||
const num = Math.floor(Math.random() * 23);
|
||||
const base = await loadImage(
|
||||
path.join(__dirname, '..', '..', 'assets', 'images', 'spongebob-time-card', `${num}.png`)
|
||||
);
|
||||
ctx.drawImage(base, 0, 0);
|
||||
ctx.textAlign = 'center';
|
||||
ctx.textBaseline = 'top';
|
||||
ctx.font = '115px Spongeboytt1';
|
||||
const lines = await wrapText(ctx, text.toUpperCase(), 813);
|
||||
const topMost = (canvas.height / 2) - (((115 * lines.length) / 2) + ((60 * (lines.length - 1)) / 2));
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const height = topMost + ((115 + 60) * i);
|
||||
ctx.fillStyle = '#ecbd3b';
|
||||
ctx.fillText(lines[i], (canvas.width / 2) - 10, height - 10);
|
||||
ctx.fillStyle = 'black';
|
||||
ctx.fillText(lines[i], canvas.width / 2, height);
|
||||
}
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'spongebob-time-card.png' }] });
|
||||
}
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "114.26.0",
|
||||
"version": "114.27.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||