rp -> fetch (alles andere)

This commit is contained in:
Flummi
2018-09-14 21:55:13 +02:00
parent 56a078ec02
commit 7b5ae1ecbf
8 changed files with 100 additions and 114 deletions

View File

@@ -1,5 +1,5 @@
import sql from "../sql";
import rp from "request-promise-native";
import fetch from "../fetch";
const data = {
yiff: [],
@@ -239,7 +239,7 @@ export default bot => {
set: "nxy",
f: e => {
const addr = !e.args[0].match(/^https?/g) ? `https://${e.args[0]}` : e.args[0];
rp(addr, { timeout: 2000 })
fetch(addr)
.then(res => {
e.reply(`[b]${addr}[/b] seems to be [b]up[/b].`);
})