2021-04-11 09:11:21 +00:00
|
|
|
import {NamedCommand, RestCommand} from "../../core";
|
2021-04-05 04:35:12 +00:00
|
|
|
import {getContent} from "../../lib";
|
2021-03-31 03:22:25 +00:00
|
|
|
import {URL} from "url";
|
2020-12-15 01:44:28 +00:00
|
|
|
|
2021-04-05 04:35:12 +00:00
|
|
|
export default new NamedCommand({
|
2020-12-15 01:44:28 +00:00
|
|
|
description: "OwO-ifies the input.",
|
2021-04-10 17:07:55 +00:00
|
|
|
run: "You need to specify some text to owoify.",
|
|
|
|
any: new RestCommand({
|
2021-04-11 09:11:21 +00:00
|
|
|
async run({send, combined}) {
|
2021-04-10 17:07:55 +00:00
|
|
|
let url = new URL(`https://nekos.life/api/v2/owoify?text=${combined}`);
|
|
|
|
const content = (await getContent(url.toString())) as any; // Apparently, the object in question is {owo: string}.
|
|
|
|
send(content.owo);
|
|
|
|
}
|
|
|
|
})
|
2020-12-15 01:44:28 +00:00
|
|
|
});
|