This commit is contained in:
Flummi 2020-08-18 01:36:03 +02:00
parent 00d0c1f199
commit 10db34349a
2 changed files with 4 additions and 11 deletions

View File

@ -1,4 +1,5 @@
import {default as fetch, cookieJar, Cookie} from "flumm-fetch-cookies";
import cfg from "../../../cfg/config.json";
const apis = {
reverse: "https://pr0gramm.com/api/items/get?flags=15&tags=!p:",
@ -22,16 +23,8 @@ const regex = {
direct: /(full|img|vid)\.pr0gramm\.com\/((?:\d+){4}\/(?:\d+){2}(?:\/(?:\d+){2})?\/(?:\w{1,20})\.(gif|png|jpg|mp4))/i
};
/*fetch("https://pr0gramm.com/api/user/login", {
method: "POST",
body: {
username: "",
password: ""
}
}).then(res => {
console.log("pr0gag: " + (res.body.statusCode === 200 ? "login successful" : "login failed. http status " + res.body.statusCode));
return res.json();
}).then(console.log);*/
cookieJar.addCookie(Cookie.fromObject(cfg.kekse.me));
cookieJar.addCookie(Cookie.fromObject(cfg.kekse.pp));
export default async bot => {

View File

@ -79,7 +79,7 @@ export default async bot => {
call: /^(\.|\/)(boll|firecooler|kinski|stoll)$/i,
set: "uwe",
f: e => {
e.reply(data[`quotes_${e.cmd}`][~~(Math.random() * data[`quotes_${e.cmd}`].length)]);
e.reply(data[`quotes_${e.cmd.toLowerCase()}`][~~(Math.random() * data[`quotes_${e.cmd.toLowerCase()}`].length)]);
}
}, {
name:"wusel",