mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Cool Text Command
This commit is contained in:
@@ -265,7 +265,7 @@ in the appropriate channel's topic to use it.
|
||||
|
||||
## Commands
|
||||
|
||||
Total: 617
|
||||
Total: 618
|
||||
|
||||
### Utility:
|
||||
|
||||
@@ -737,6 +737,7 @@ Total: 617
|
||||
* **caution:** Creates a caution sign with the text of your choice.
|
||||
* **certificate:** Sends a certificate of excellence with the name and reason of your choice.
|
||||
* **chinese-restaurant:** Sends a Chinese restaurant sign with the text of your choice.
|
||||
* **cool-text:** Writes text in some cool fonts.
|
||||
* **danger:** Creates a danger sign with the text of your choice.
|
||||
* **font:** Types text in a specific font.
|
||||
* **gandhi-quote:** Makes Mahatma Gandhi say the quote you want.
|
||||
@@ -1127,6 +1128,8 @@ here.
|
||||
* zalgo ([Zalgo Character Data](https://github.com/clux/zalgolize/blob/master/zalgo.js#L3-L21))
|
||||
- [CoolClips.com](http://search.coolclips.com/)
|
||||
* sip ([Image](http://search.coolclips.com/m/vector/hand0007/Hands-holding-mug/))
|
||||
- [Cool Text Graphics Generator](https://cooltext.com/)
|
||||
* cool-text (API)
|
||||
- [cowsay Online](http://cowsay.morecode.org/)
|
||||
* cow-say (API)
|
||||
- [Creative Certificates](https://www.creativecertificates.com/)
|
||||
|
||||
@@ -0,0 +1,272 @@
|
||||
{
|
||||
"fun": {
|
||||
"LogoID": "1009848424",
|
||||
"FontSize": "70",
|
||||
"Color1_color": "#F2D324",
|
||||
"Color2_color": "#F02B2B",
|
||||
"Color3_color": "#000000",
|
||||
"Integer1": "3",
|
||||
"Integer5": "2",
|
||||
"Integer7": "8",
|
||||
"Integer8": "8",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "75",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"burning": {
|
||||
"LogoID": "4",
|
||||
"FontSize": "70",
|
||||
"Color1_color": "#FF0000",
|
||||
"Integer1": "15",
|
||||
"Boolean1": "on",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"white": {
|
||||
"LogoID": "732438332",
|
||||
"FontSize": "70",
|
||||
"Color1_color": "#000000",
|
||||
"Color2_color": "#FFFFFF",
|
||||
"Color3_color": "#FFFFFF",
|
||||
"Integer5": "0",
|
||||
"Integer7": "0",
|
||||
"Integer8": "0",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "75",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"fantasy": {
|
||||
"LogoID": "45",
|
||||
"FontSize": "70",
|
||||
"Color1_color": "#D5CE5F",
|
||||
"Color2_color": "#D5CE5F",
|
||||
"Integer1": "135",
|
||||
"Integer2": "45",
|
||||
"Integer3": "3",
|
||||
"Integer5": "2",
|
||||
"Integer7": "3",
|
||||
"Integer8": "3",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "50",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"dragon": {
|
||||
"LogoID": "1408867449",
|
||||
"FontSize": "120",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"ice": {
|
||||
"LogoID": "1779834160",
|
||||
"FontSize": "120",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"gunmetal": {
|
||||
"LogoID": "852819205",
|
||||
"FontSize": "70",
|
||||
"Color1_color": "#FAFAFA",
|
||||
"Boolean2": "on",
|
||||
"Integer5": "4",
|
||||
"Integer7": "0",
|
||||
"Integer8": "0",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "70",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"wizards": {
|
||||
"LogoID": "38",
|
||||
"FontSize": "70",
|
||||
"Boolean2": "on",
|
||||
"Integer5": "0",
|
||||
"Integer7": "0",
|
||||
"Integer8": "0",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "75",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "5",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"sword": {
|
||||
"LogoID": "2172004512",
|
||||
"FontSize": "120",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"vampire": {
|
||||
"LogoID": "732414977",
|
||||
"FontSize": "70",
|
||||
"Boolean1": "on",
|
||||
"Color1_color": "#FC14F4",
|
||||
"Color2_color": "#60D4CE",
|
||||
"Integer1": "135",
|
||||
"Integer2": "45",
|
||||
"Integer3": "3",
|
||||
"Integer5": "2",
|
||||
"Integer7": "3",
|
||||
"Integer8": "3",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "50",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"dark": {
|
||||
"LogoID": "830474754",
|
||||
"FontSize": "70",
|
||||
"Boolean1": "on",
|
||||
"Boolean2": "on",
|
||||
"Integer1": "5",
|
||||
"Boolean3": "on",
|
||||
"Integer5": "4",
|
||||
"Integer7": "2",
|
||||
"Integer8": "2",
|
||||
"Integer14_color": "#FFF2FF",
|
||||
"Integer6": "30",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"comic": {
|
||||
"LogoID": "9",
|
||||
"FontSize": "70",
|
||||
"Integer1": "5",
|
||||
"Integer5": "2",
|
||||
"Integer7": "0",
|
||||
"Integer8": "0",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "75",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#000000"
|
||||
},
|
||||
"spring": {
|
||||
"LogoID": "759902224",
|
||||
"FontSize": "70",
|
||||
"Color1_color": "#66FFCC",
|
||||
"Color2_color": "#B94FFF",
|
||||
"Integer1": "6",
|
||||
"Integer2": "1",
|
||||
"Integer5": "0",
|
||||
"Integer7": "3",
|
||||
"Integer8": "3",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "75",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"slab": {
|
||||
"LogoID": "17",
|
||||
"FontSize": "70",
|
||||
"Color1_color": "#EFE66E",
|
||||
"Integer1": "100",
|
||||
"Boolean1": "on",
|
||||
"Integer5": "2",
|
||||
"Integer7": "0",
|
||||
"Integer8": "0",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "75",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"flaming": {
|
||||
"LogoID": "1169711118",
|
||||
"FontSize": "90",
|
||||
"Color1_color": "#4D0000",
|
||||
"Integer1": "90",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"lava": {
|
||||
"LogoID": "852774362",
|
||||
"FontSize": "70",
|
||||
"Boolean1": "on",
|
||||
"Integer1": "3",
|
||||
"Boolean3": "on",
|
||||
"Integer5": "2",
|
||||
"Integer7": "2",
|
||||
"Integer8": "2",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "60",
|
||||
"Integer9": "6",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#000000"
|
||||
},
|
||||
"tough": {
|
||||
"LogoID": "758282876",
|
||||
"FontSize": "70",
|
||||
"Color1_color": "#0A213D",
|
||||
"Integer1": "5",
|
||||
"Integer5": "0",
|
||||
"Integer7": "0",
|
||||
"Integer8": "0",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "75",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"gold": {
|
||||
"LogoID": "46",
|
||||
"FontSize": "70",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
},
|
||||
"sushi": {
|
||||
"LogoID": "830446526",
|
||||
"FontSize": "70",
|
||||
"Color1_color": "#CC0808",
|
||||
"Color2_color": "#E3D110",
|
||||
"Integer1": "135",
|
||||
"Integer2": "45",
|
||||
"Integer3": "2",
|
||||
"Integer5": "2",
|
||||
"Integer7": "2",
|
||||
"Integer8": "2",
|
||||
"Integer14_color": "#000000",
|
||||
"Integer6": "40",
|
||||
"Integer9": "0",
|
||||
"Integer13": "on",
|
||||
"Integer12": "on",
|
||||
"FileFormat": "6",
|
||||
"BackgroundColor_color": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const request = require('node-superfetch');
|
||||
const { list } = require('../../util/Util');
|
||||
const fonts = require('../../assets/json/cool-text');
|
||||
|
||||
module.exports = class CoolTextCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'cool-text',
|
||||
group: 'edit-image-text',
|
||||
memberName: 'cool-text',
|
||||
description: 'Writes text in some cool fonts.',
|
||||
details: `**Fonts:** ${Object.keys(fonts).join(', ')}`,
|
||||
credit: [
|
||||
{
|
||||
name: 'Cool Text Graphics Generator',
|
||||
url: 'https://cooltext.com/',
|
||||
reason: 'API'
|
||||
}
|
||||
],
|
||||
args: [
|
||||
{
|
||||
key: 'font',
|
||||
prompt: `What font do you want to use? Either ${list(Object.keys(fonts), 'or')}.`,
|
||||
type: 'string',
|
||||
oneOf: Object.keys(fonts),
|
||||
parse: font => font.toLowerCase()
|
||||
},
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What text do you want to write?',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { font, text }) {
|
||||
try {
|
||||
const { body } = await request
|
||||
.post('https://cooltext.com/PostChange')
|
||||
.attach({
|
||||
...fonts[font].options,
|
||||
Text: text
|
||||
});
|
||||
return msg.say({ files: [body.renderLocation] });
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "131.11.2",
|
||||
"version": "131.12.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user