diff --git a/src/api.ts b/src/api.ts index f7b3881..7d8ee46 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,8 +1,7 @@ /*eslint prefer-const: "error"*/ import * as cheerio from 'cheerio'; import { CommandInteraction } from 'discord.js'; -import { IncomingMessage } from 'http'; -import http from 'https'; +import http, { IncomingMessage } from 'http'; import { emsg } from './util/main'; import * as Lang from './lang'; @@ -27,8 +26,8 @@ function getHTML(name: string): Promise { return new Promise((resolve, reject) => { - const init = { - host: 'uniteapi.dev', + const opts = { + host: '147.182.215.216', path: `/p/${encodeURIComponent(name)}`, method: 'GET', }; @@ -50,7 +49,7 @@ function getHTML(name: string): Promise { }); }; - const req = http.request(init, callback); + const req = http.request(opts, callback); req.end(); });