유병우

Update lospi command

...@@ -2,3 +2,19 @@ const { SlashCommandBuilder } = require('@discordjs/builders'); ...@@ -2,3 +2,19 @@ const { SlashCommandBuilder } = require('@discordjs/builders');
2 const { MessageEmbed } = require('discord.js'); 2 const { MessageEmbed } = require('discord.js');
3 const axios = require("axios"); 3 const axios = require("axios");
4 const cheerio = require("cheerio"); 4 const cheerio = require("cheerio");
5 +
6 +module.exports = {
7 + data: new SlashCommandBuilder()
8 + .setName('시세')
9 + .setDescription('현재 100크리스탈 당 골드 시세를 조회합니다.'),
10 + async execute(interaction) {
11 + async function getHTML() {
12 + try {
13 + return await axios.get("https://www.mgx.kr/lostark/goldexchange/");
14 + } catch (error) {
15 + console.error(error);
16 + }
17 + };
18 +
19 + },
20 +};
...\ No newline at end of file ...\ No newline at end of file
......