Hollywood Star Command

This commit is contained in:
Dragon Fire
2020-04-19 18:44:02 -04:00
parent 804db4089f
commit f8da369dd7
5 changed files with 70 additions and 2 deletions
+8 -1
View File
@@ -132,7 +132,7 @@ in the appropriate channel's topic to use it.
## Commands
Total: 391
Total: 392
### Utility:
@@ -421,6 +421,7 @@ Total: 391
* **glass-shatter:** Draws an image or a user's avatar with a glass shatter in front of it.
* **glitch:** Draws an image or a user's avatar but glitched.
* **greyscale:** Draws an image or a user's avatar in greyscale.
* **hollywood-star:** Sends a Hollywood Walk of Fame star with the name of your choice.
* **ifunny:** Draws an image with the iFunny logo.
* **invert:** Draws an image or a user's avatar but inverted.
* **minecraft-skin:** Sends the Minecraft skin for a user.
@@ -629,6 +630,8 @@ here.
* adorable (API)
- [Advice Slip](https://adviceslip.com/)
* advice ([API](https://api.adviceslip.com/))
- [Alexey Star](https://alexeystar.com/)
* hollywood-star ([Hollywood Star Font](https://alexeystar.com/hollywood-star-font/))
- [Alpha Vantage](https://www.alphavantage.co/)
* stocks (API)
- [Andrew Tyler](https://www.dafont.com/andrew-tyler.d2526)
@@ -787,6 +790,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))
- [Hollywood Walk of Fame](https://walkoffame.com/)
* hollywood-star (Concept)
- [Horst Faas](https://en.wikipedia.org/wiki/Horst_Faas)
* vietnam-flashbacks (Image)
- [HTTP Cats](https://http.cat/)
@@ -1010,6 +1015,8 @@ here.
* subreddit ([API](https://www.reddit.com/dev/api/))
- [Redeeming God](https://redeeminggod.com/)
* approved ([Image](https://redeeminggod.com/courses/gospel-dictionary/lessons/gospel-dictionary-approved/))
- [RedKid.Net](http://www.redkid.net/)
* hollywood-star ([Image](http://www.redkid.net/generator/star/))
- [Rest Countries](https://restcountries.eu/)
* country (API)
- [Right Stuf Anime](https://www.rightstufanime.com/)
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

+61
View File
@@ -0,0 +1,61 @@
const Command = require('../../structures/Command');
const { createCanvas, loadImage, registerFont } = require('canvas');
const path = require('path');
registerFont(path.join(__dirname, '..', '..', 'assets', 'fonts', 'HollywoodStar.otf'), { family: 'Hollywood Star' });
module.exports = class HollywoodStarCommand extends Command {
constructor(client) {
super(client, {
name: 'hollywood-star',
aliases: ['hollywood', 'walk-of-fame', 'walk-of-fame-star'],
group: 'edit-image',
memberName: 'hollywood-star',
description: 'Sends a Hollywood Walk of Fame star with the name of your choice.',
throttling: {
usages: 1,
duration: 10
},
clientPermissions: ['ATTACH_FILES'],
credit: [
{
name: 'RedKid.Net',
url: 'http://www.redkid.net/',
reason: 'Image',
reasonURL: 'http://www.redkid.net/generator/star/'
},
{
name: 'Alexey Star',
url: 'https://alexeystar.com/',
reason: 'Hollywood Star Font',
reasonURL: 'https://alexeystar.com/hollywood-star-font/'
},
{
name: 'Hollywood Walk of Fame',
url: 'https://walkoffame.com/',
reason: 'Concept'
}
],
args: [
{
key: 'name',
prompt: 'What name should be on the star?',
type: 'string',
max: 30
}
]
});
}
async run(msg, { name }) {
const base = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'hollywood-star.png'));
const canvas = createCanvas(base.width, base.height);
const ctx = canvas.getContext('2d');
ctx.drawImage(base, 0, 0);
ctx.font = '28px Hollywood Star';
ctx.fillStyle = '#fadfd4';
ctx.textAlign = 'center';
ctx.textBaseline = 'top';
ctx.fillText(name.toLowerCase(), 288, 140);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'hollywood-star.png' }] });
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "113.5.0",
"version": "113.6.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {