updated api
This commit is contained in:
@@ -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<string> {
|
||||
|
||||
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<string> {
|
||||
});
|
||||
};
|
||||
|
||||
const req = http.request(init, callback);
|
||||
const req = http.request(opts, callback);
|
||||
req.end();
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user