nyx/command/Fun/sr.js
2021-09-06 18:38:25 +08:00

28 lines
703 B
JavaScript

const axios = require("axios");
module.exports = {
name: "superscript",
description: "Superscript your text",
usage: "(text)",
category: "Fun",
type: "CHAT_INPUT",
options: [
{
type: 3,
name: "text",
description: "The text you want to convert",
required: true,
},
],
run: async (client, interaction, args) => {
const text = args[0];
if (text.includes("@"))
return await interaction.followUp({
content: "Text cannot includes '@'",
});
const data = await axios
.get(`${process.env.api}/api/v1/fun/superscript?text=${text}`)
.then(res => res.data.text);
await interaction.followUp({ content: data });
},
};