TravBot-v3/src/commands/fun/owoify.ts

13 lines
458 B
TypeScript
Raw Normal View History

2020-12-15 01:44:28 +00:00
import Command from "../../core/command";
2021-03-31 03:22:25 +00:00
import {getContent} from "../../core/lib";
import {URL} from "url";
2020-12-15 01:44:28 +00:00
export default new Command({
description: "OwO-ifies the input.",
async run($) {
2020-12-15 07:56:09 +00:00
let url = new URL(`https://nekos.life/api/v2/owoify?text=${$.args.join(" ")}`);
2021-03-31 03:22:25 +00:00
const content = (await getContent(url.toString())) as any; // Apparently, the object in question is {owo: string}.
2020-12-15 01:44:28 +00:00
$.channel.send(content.owo);
}
});