he she it, the mjs must fit

This commit is contained in:
Flummi 2019-08-28 20:04:41 +00:00
parent e91e4b3624
commit 2988582905
18 changed files with 25 additions and 20 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ dist/
.vscode/ .vscode/
logs/ logs/
package-lock.json package-lock.json
yarn.lock

View File

@ -6,7 +6,7 @@
"scripts": { "scripts": {
"start": "node --experimental-modules src/bot.mjs", "start": "node --experimental-modules src/bot.mjs",
"rmlog": "rm logs/*.log || true", "rmlog": "rm logs/*.log || true",
"debug": "npm run rmlog ; npm start" "debug": "yarn run rmlog ; yarn start"
}, },
"author": "Flummi & jkhsjdhjs", "author": "Flummi & jkhsjdhjs",
"license": "WTFPL", "license": "WTFPL",

View File

@ -1,7 +1,7 @@
import _fs from "fs"; import _fs from "fs";
import cuffeo from "cuffeo"; import cuffeo from "cuffeo";
import config from "../cfg/config.json"; import config from "../cfg/config.json";
import logger from "./inc/log"; import logger from "./inc/log.mjs";
const fs = _fs.promises; const fs = _fs.promises;
const timeout = 1000; const timeout = 1000;

View File

@ -1,4 +1,4 @@
import { default as config } from "../../cfg/config.json"; import config from "../../cfg/config.json";
export const getLevel = (network, user) => { export const getLevel = (network, user) => {
let ret = { let ret = {

View File

@ -1,10 +1,12 @@
import logger from "../log.mjs";
export default async bot => { export default async bot => {
return [{ return [{
name: "error", name: "error",
listener: "error", listener: "error",
f: e => { f: e => {
console.log(e); logger.error(e);
} }
}]; }];
}; };

View File

@ -1,10 +1,12 @@
import logger from "../log.mjs";
export default async bot => { export default async bot => {
return [{ return [{
name: "info", name: "info",
listener: "info", listener: "info",
f: e => { f: e => {
console.log(e); logger.debug(e);
} }
}]; }];
}; };

View File

@ -1,5 +1,5 @@
import logger from "../log"; import logger from "../log.mjs";
import { getLevel } from "../../inc/admin"; import { getLevel } from "../../inc/admin.mjs";
const parseArgs = msg => { const parseArgs = msg => {
let args = msg.trim().split(" ") let args = msg.trim().split(" ")

View File

@ -1,5 +1,5 @@
export default async bot => { export default async bot => {
const cleverbot = (await import("./lib/cleverbot")).default; const cleverbot = (await import("./lib/cleverbot.mjs")).default;
return [{ return [{
name: "chatbot", name: "chatbot",

View File

@ -1,4 +1,4 @@
import sql from "../sql"; import sql from "../sql.mjs";
const data = { const data = {
cookie_cookies: [], cookie_cookies: [],

View File

@ -1,4 +1,4 @@
import { getLevel } from "../admin"; import { getLevel } from "../admin.mjs";
import fetch from "flumm-fetch-cookies"; import fetch from "flumm-fetch-cookies";
import vm from "vm"; import vm from "vm";

View File

@ -1,4 +1,4 @@
import sql from "../sql"; import sql from "../sql.mjs";
const data = { const data = {
dope_actions: {}, dope_actions: {},

View File

@ -1,4 +1,4 @@
import sql from "../sql"; import sql from "../sql.mjs";
let _query_get = ` let _query_get = `
select item, select item,

View File

@ -1,4 +1,4 @@
import sql from "../sql"; import sql from "../sql.mjs";
import fetch from "flumm-fetch-cookies"; import fetch from "flumm-fetch-cookies";
let _query_get = ` let _query_get = `

View File

@ -1,4 +1,4 @@
import sql from "../sql"; import sql from "../sql.mjs";
export default async bot => { export default async bot => {

View File

@ -1,5 +1,5 @@
import sql from "../sql"; import sql from "../sql.mjs";
import { maxoutput, sandbox, bfgen } from "./lib/sandbox"; import { maxoutput, sandbox, bfgen } from "./lib/sandbox.mjs";
import vm from "vm"; import vm from "vm";
import fetch from "flumm-fetch-cookies"; import fetch from "flumm-fetch-cookies";

View File

@ -1,4 +1,4 @@
import sql from "../sql"; import sql from "../sql.mjs";
import fetch from "flumm-fetch-cookies"; import fetch from "flumm-fetch-cookies";
const data = { const data = {

View File

@ -1,4 +1,4 @@
import sql from "../sql"; import sql from "../sql.mjs";
import fetch from "flumm-fetch-cookies"; import fetch from "flumm-fetch-cookies";
const data = { const data = {

View File

@ -1,6 +1,6 @@
import fetch from "flumm-fetch-cookies"; import fetch from "flumm-fetch-cookies";
import config from "../../../cfg/config.json"; import config from "../../../cfg/config.json";
import { conds } from "./lib/wttr"; import { conds } from "./lib/wttr.mjs";
export default async bot => { export default async bot => {