유병우

Update servicing loawa

......@@ -14,5 +14,18 @@ module.exports = {
.setRequired(true)
),
async execute(interaction) {
async function getHTML() {
try {
return await axios.get(encodeURI(`https://lostark.game.onstove.com/Profile/Character/${interaction.options.getString("닉네임")}`));
} catch (error) {
console.error(error);
}
};
await getHTML().then(html=>{
const $ = cheerio.load(html.data);
open(`https://loawa.com/char/${interaction.options.getString("닉네임")}`);
interaction.reply({content: `${interaction.options.getString("닉네임")}의 로아와 정보로 이동합니다.`, allowedMentions: {repliedUser: false}});
});
},
};
\ No newline at end of file
......