he she it, the mjs must fit
This commit is contained in:
parent
e91e4b3624
commit
2988582905
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,3 +4,4 @@ dist/
|
||||||
.vscode/
|
.vscode/
|
||||||
logs/
|
logs/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
yarn.lock
|
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
|
@ -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(" ")
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import sql from "../sql";
|
import sql from "../sql.mjs";
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
cookie_cookies: [],
|
cookie_cookies: [],
|
||||||
|
|
|
@ -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";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import sql from "../sql";
|
import sql from "../sql.mjs";
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
dope_actions: {},
|
dope_actions: {},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import sql from "../sql";
|
import sql from "../sql.mjs";
|
||||||
|
|
||||||
let _query_get = `
|
let _query_get = `
|
||||||
select item,
|
select item,
|
||||||
|
|
|
@ -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 = `
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import sql from "../sql";
|
import sql from "../sql.mjs";
|
||||||
|
|
||||||
export default async bot => {
|
export default async bot => {
|
||||||
|
|
||||||
|
|
|
@ -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";
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 => {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user