2021-04-13 12:38:52 +00:00
|
|
|
import {NamedCommand, RestCommand} from "onion-lasers";
|
2021-07-07 08:51:26 +00:00
|
|
|
import {random} from "../../lib";
|
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-07-07 08:51:26 +00:00
|
|
|
// Copied from <https://github.com/Nekos-life/neko-website/blob/78b2532de2d91375d6de45e4446fc766ba169472/app.py#L78-L87>.
|
|
|
|
const faces = ["owo", "UwU", ">w<", "^w^"];
|
|
|
|
const owoified = combined
|
|
|
|
.replace(/[rl]/g, "w")
|
|
|
|
.replace(/[RL]/g, "W")
|
|
|
|
.replace(/ove/g, "uv")
|
|
|
|
.replace(/n/g, "ny")
|
|
|
|
.replace(/N/g, "NY")
|
|
|
|
.replace(/\!/g, ` ${random(faces)} `);
|
|
|
|
send(owoified);
|
2021-04-10 17:07:55 +00:00
|
|
|
}
|
|
|
|
})
|
2020-12-15 01:44:28 +00:00
|
|
|
});
|