이것저것/디스코드 봇
[Discord Bot] 코로나 확진자 보여주기
[Discord Bot] 코로나 확진자 보여주기
2020.03.29const request = require('request-promise'); const cheerio = require('cheerio'); const { RichEmbed } = require('discord.js'); async function getAddress(args) { var url = 'http://ncov.mohw.go.kr/index_main.jsp'; let virus, virus_text; let virus_list = []; let options = { url: url, method: 'GET', headers: { 'Accept-Language': 'ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3', 'User-Agent': 'Mozilla/5.0 (Window..
[Discord Bot] 미세먼지 시각화로 보여주기
[Discord Bot] 미세먼지 시각화로 보여주기
2020.03.29const request = require('request-promise'); const Pageres = require('pageres'); const fs = require('fs-extra'); const path = require('path'); const { RichEmbed } = require('discord.js'); async function capture() { await new Pageres({delay: 2, filename: 'dust'}) .src('https://earth.nullschool.net/#current/particulates/surface/level/overlay=pm10/orthographic=127.53,39.09,2196/loc=127.333,37.782', ..
[Discord Bot] 네이버 실시간 급상승 Top20
[Discord Bot] 네이버 실시간 급상승 Top20
2020.02.08const request = require('request-promise'); const cheerio = require('cheerio'); const { RichEmbed } = require('discord.js'); async function getRank(args) { let url = 'http://rank.search.naver.com/rank.js'; let html; try { html = await request(url); } catch (e) { console.log("error"); return "Error"; } let json = JSON.parse(html); let jsonData = json.data[0].data const Rank_List = []; for (const ..
[Discord Bot] 롤 전적 검색기
[Discord Bot] 롤 전적 검색기
2020.02.08const request = require('request-promise'); const cheerio = require('cheerio'); const { RichEmbed } = require('discord.js'); async function getStat(args) { if (args.length < 2) { return '`!롤 ` 형식으로 부탁'; } // console.log(args); const search = args.slice(1, args.length).join(' '); // console.log(search); let url = 'https://www.op.gg/summoner/userName=' + encodeURIComponent(search); let options = {..