mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Hollywood Star Command
This commit is contained in:
@@ -132,7 +132,7 @@ in the appropriate channel's topic to use it.
|
|||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
Total: 391
|
Total: 392
|
||||||
|
|
||||||
### Utility:
|
### 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.
|
* **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.
|
* **glitch:** Draws an image or a user's avatar but glitched.
|
||||||
* **greyscale:** Draws an image or a user's avatar in greyscale.
|
* **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.
|
* **ifunny:** Draws an image with the iFunny logo.
|
||||||
* **invert:** Draws an image or a user's avatar but inverted.
|
* **invert:** Draws an image or a user's avatar but inverted.
|
||||||
* **minecraft-skin:** Sends the Minecraft skin for a user.
|
* **minecraft-skin:** Sends the Minecraft skin for a user.
|
||||||
@@ -629,6 +630,8 @@ here.
|
|||||||
* adorable (API)
|
* adorable (API)
|
||||||
- [Advice Slip](https://adviceslip.com/)
|
- [Advice Slip](https://adviceslip.com/)
|
||||||
* advice ([API](https://api.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/)
|
- [Alpha Vantage](https://www.alphavantage.co/)
|
||||||
* stocks (API)
|
* stocks (API)
|
||||||
- [Andrew Tyler](https://www.dafont.com/andrew-tyler.d2526)
|
- [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))
|
* 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))
|
||||||
|
- [Hollywood Walk of Fame](https://walkoffame.com/)
|
||||||
|
* hollywood-star (Concept)
|
||||||
- [Horst Faas](https://en.wikipedia.org/wiki/Horst_Faas)
|
- [Horst Faas](https://en.wikipedia.org/wiki/Horst_Faas)
|
||||||
* vietnam-flashbacks (Image)
|
* vietnam-flashbacks (Image)
|
||||||
- [HTTP Cats](https://http.cat/)
|
- [HTTP Cats](https://http.cat/)
|
||||||
@@ -1010,6 +1015,8 @@ here.
|
|||||||
* subreddit ([API](https://www.reddit.com/dev/api/))
|
* subreddit ([API](https://www.reddit.com/dev/api/))
|
||||||
- [Redeeming God](https://redeeminggod.com/)
|
- [Redeeming God](https://redeeminggod.com/)
|
||||||
* approved ([Image](https://redeeminggod.com/courses/gospel-dictionary/lessons/gospel-dictionary-approved/))
|
* 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/)
|
- [Rest Countries](https://restcountries.eu/)
|
||||||
* country (API)
|
* country (API)
|
||||||
- [Right Stuf Anime](https://www.rightstufanime.com/)
|
- [Right Stuf Anime](https://www.rightstufanime.com/)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
@@ -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
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "113.5.0",
|
"version": "113.6.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