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

3
.gitignore vendored
View File

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

View File

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

View File

@ -1,7 +1,7 @@
import _fs from "fs";
import cuffeo from "cuffeo";
import config from "../cfg/config.json";
import logger from "./inc/log";
import logger from "./inc/log.mjs";
const fs = _fs.promises;
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) => {
let ret = {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
import sql from "../sql";
import { maxoutput, sandbox, bfgen } from "./lib/sandbox";
import sql from "../sql.mjs";
import { maxoutput, sandbox, bfgen } from "./lib/sandbox.mjs";
import vm from "vm";
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";
const data = {

View File

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

View File

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