mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Lolcat Command
This commit is contained in:
@@ -132,7 +132,7 @@ in the appropriate channel's topic to use it.
|
||||
|
||||
## Commands
|
||||
|
||||
Total: 393
|
||||
Total: 394
|
||||
|
||||
### Utility:
|
||||
|
||||
@@ -507,6 +507,7 @@ Total: 393
|
||||
* **hex:** Converts text to hex.
|
||||
* **latlmes:** Creates a Latlmes fake link that redirects to a rickroll.
|
||||
* **lmgtfy:** Creates a LMGTFY link with the query you provide.
|
||||
* **lolcat:** Converts text to lolcat.
|
||||
* **lowercase:** Converts text to lowercase.
|
||||
* **md5:** Creates a hash of text with the MD5 algorithm.
|
||||
* **mocking:** SenDs TexT lIkE ThiS.
|
||||
@@ -1056,6 +1057,8 @@ here.
|
||||
* soundcloud ([API](https://developers.soundcloud.com/))
|
||||
- [SPAM Brand](https://www.spam.com/)
|
||||
* spam (Image)
|
||||
- [speak lolcat](https://speaklolcat.com/)
|
||||
* lolcat (Translation Data)
|
||||
- [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/))
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const request = require('node-superfetch');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = class LolcatCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'lolcat',
|
||||
group: 'edit-text',
|
||||
memberName: 'lolcat',
|
||||
description: 'Converts text to lolcat.',
|
||||
credit: [
|
||||
{
|
||||
name: 'speak lolcat',
|
||||
url: 'https://speaklolcat.com/',
|
||||
reason: 'Translation Data'
|
||||
}
|
||||
],
|
||||
args: [
|
||||
{
|
||||
key: 'from',
|
||||
label: 'text',
|
||||
prompt: 'What text would you like to convert to lolcat?',
|
||||
type: 'string',
|
||||
max: 500
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { from }) {
|
||||
try {
|
||||
const { text } = await request
|
||||
.get('https://speaklolcat.com/')
|
||||
.query({ from });
|
||||
const $ = cheerio.load(text);
|
||||
const translated = $('textarea[id="to"]').first().text;
|
||||
return msg.say(translated);
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "113.7.1",
|
||||
"version": "113.8.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user