switch to my own version of revolt.js
-> https://github.com/revoltchat/revolt.js/pull/26
This commit is contained in:
parent
ef48350e4e
commit
ea4212d3ab
21 changed files with 50 additions and 45 deletions
|
@ -12,6 +12,7 @@
|
|||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@janderedev/revolt.js": "^5.1.0-alpha.9-patch.0",
|
||||
"@types/monk": "^6.0.0",
|
||||
"axios": "^0.22.0",
|
||||
"dayjs": "^1.10.7",
|
||||
|
@ -19,7 +20,6 @@
|
|||
"form-data": "^4.0.0",
|
||||
"log75": "2.0.1",
|
||||
"monk": "^7.3.4",
|
||||
"revolt.js": "^5.1.0-alpha.9",
|
||||
"ulid": "^2.3.0",
|
||||
"xlsx": "^0.17.3"
|
||||
},
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { hasPerm, parseUser } from "../util";
|
||||
import ServerConfig from "../../struct/ServerConfig";
|
||||
import { client } from "../..";
|
||||
import { User } from "revolt.js/dist/maps/Users";
|
||||
import { User } from "@janderedev/revolt.js/dist/maps/Users";
|
||||
|
||||
const SYNTAX = '/admin add @user; /admin remove @user; /admin list';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
|
||||
export default {
|
||||
name: 'debug',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { inspect } from 'util';
|
||||
import { client } from "../..";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
|
||||
export default {
|
||||
name: 'help',
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { isBotManager, NO_MANAGER_MSG, parseUser } from "../util";
|
||||
import ServerConfig from "../../struct/ServerConfig";
|
||||
import { client } from "../..";
|
||||
import { User } from "revolt.js/dist/maps/Users";
|
||||
import { User } from "@janderedev/revolt.js/dist/maps/Users";
|
||||
|
||||
const SYNTAX = '/mod add @user; /mod remove @user; /mod list';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { client } from "../..";
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { client } from "../..";
|
||||
import ServerConfig from "../../struct/ServerConfig";
|
||||
import { DEFAULT_PREFIX } from "../modules/command_handler";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { decodeTime } from 'ulid';
|
||||
import { isModerator, parseUser } from "../util";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { client } from "../..";
|
||||
import AutomodSettings from "../../struct/antispam/AutomodSettings";
|
||||
import AntispamRule from "../../struct/antispam/AntispamRule";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { exec } from 'child_process';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
|
||||
export default {
|
||||
name: 'test',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { isModerator, NO_MANAGER_MSG, parseUser, storeInfraction } from "../util";
|
||||
import Infraction from "../../struct/antispam/Infraction";
|
||||
import { ulid } from "ulid";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Command from "../../struct/Command";
|
||||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { client } from "../..";
|
||||
import Infraction from "../../struct/antispam/Infraction";
|
||||
import InfractionType from "../../struct/antispam/InfractionType";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { User } from "revolt.js/dist/maps/Users";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { User } from "@janderedev/revolt.js/dist/maps/Users";
|
||||
import { client } from "../..";
|
||||
import Command from "../../struct/Command";
|
||||
import ServerConfig from "../../struct/ServerConfig";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Message } from "revolt.js/dist/maps/Messages";
|
||||
import { Message } from "@janderedev/revolt.js/dist/maps/Messages";
|
||||
import { ulid } from "ulid";
|
||||
import { client } from "../..";
|
||||
import AntispamRule from "../../struct/antispam/AntispamRule";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Member } from "revolt.js/dist/maps/Members";
|
||||
import { User } from "revolt.js/dist/maps/Users";
|
||||
import { Member } from "@janderedev/revolt.js/dist/maps/Members";
|
||||
import { User } from "@janderedev/revolt.js/dist/maps/Users";
|
||||
import { client } from "../..";
|
||||
import ServerConfig from "../../struct/ServerConfig";
|
||||
import logger from "../logger";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Member } from "revolt.js/dist/maps/Members";
|
||||
import { User } from "revolt.js/dist/maps/Users";
|
||||
import { Member } from "@janderedev/revolt.js/dist/maps/Members";
|
||||
import { User } from "@janderedev/revolt.js/dist/maps/Users";
|
||||
import { client } from "..";
|
||||
import Infraction from "../struct/antispam/Infraction";
|
||||
import ServerConfig from "../struct/ServerConfig";
|
||||
|
|
|
@ -7,7 +7,7 @@ import MongoDB from './bot/db';
|
|||
logger.info('Initializing client');
|
||||
|
||||
let db = MongoDB();
|
||||
let client = new AutomodClient({ /* client config */ }, db);
|
||||
let client = new AutomodClient({ pongTimeout: 10, onPongTimeout: 'RECONNECT' }, db);
|
||||
login(client);
|
||||
|
||||
export { client }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as Revolt from 'revolt.js';
|
||||
import * as Revolt from "@janderedev/revolt.js";
|
||||
import { IMonkManager } from 'monk';
|
||||
import logger from '../bot/logger';
|
||||
|
||||
|
|
45
yarn.lock
45
yarn.lock
|
@ -2,6 +2,22 @@
|
|||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@janderedev/revolt.js@^5.1.0-alpha.9-patch.0":
|
||||
version "5.1.0-alpha.9-patch.0"
|
||||
resolved "https://registry.yarnpkg.com/@janderedev/revolt.js/-/revolt.js-5.1.0-alpha.9-patch.0.tgz#de1da9e4d09b6d07f341b9d7590a730f185de84a"
|
||||
integrity sha512-9fzZ/hCy16//UOIHT0k7dDPyD+Wl/ijTU/wCM25EQcz2saUgBcwatjrVp2KJ0/jZmqiiYHQayCRCku2WJCyZcQ==
|
||||
dependencies:
|
||||
axios "^0.21.4"
|
||||
eventemitter3 "^4.0.7"
|
||||
exponential-backoff "^3.1.0"
|
||||
isomorphic-ws "^4.0.1"
|
||||
lodash.defaultsdeep "^4.6.1"
|
||||
lodash.isequal "^4.5.0"
|
||||
mobx "^6.3.2"
|
||||
revolt-api "^0.5.3-alpha.8-patch.0"
|
||||
ulid "^2.3.0"
|
||||
ws "^8.2.2"
|
||||
|
||||
"@types/bson@*":
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/bson/-/bson-4.2.0.tgz#a2f71e933ff54b2c3bf267b67fa221e295a33337"
|
||||
|
@ -187,7 +203,12 @@ fflate@^0.7.1:
|
|||
resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.7.1.tgz#56e87e87c3f2fe01b025fbb1c4ea835990c02fa2"
|
||||
integrity sha512-VYM2Xy1gSA5MerKzCnmmuV2XljkpKwgJBKezW+495TTnTCh1x5HcYa1aH8wRU/MfTGhW4ziXqgwprgQUVl3Ohw==
|
||||
|
||||
follow-redirects@^1.14.0, follow-redirects@^1.14.4:
|
||||
follow-redirects@^1.14.0:
|
||||
version "1.14.5"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.5.tgz#f09a5848981d3c772b5392309778523f8d85c381"
|
||||
integrity sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==
|
||||
|
||||
follow-redirects@^1.14.4:
|
||||
version "1.14.4"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379"
|
||||
integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==
|
||||
|
@ -261,9 +282,9 @@ mime-types@^2.1.12:
|
|||
mime-db "1.50.0"
|
||||
|
||||
mobx@^6.3.2:
|
||||
version "6.3.3"
|
||||
resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.3.3.tgz#a3006c56243b1c7ea4ee671a66f963b9f43cf1af"
|
||||
integrity sha512-JoNU50rO6d1wHwKPJqKq4rmUMbYnI9CsJmBo+Cu4exBYenFvIN77LWrZENpzW6reZPADtXMmB1DicbDSfy8Clw==
|
||||
version "6.3.7"
|
||||
resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.3.7.tgz#9ed85561e86da45141134c8fa20cf5f9c7246c3d"
|
||||
integrity sha512-X7yU7eOEyxIBk4gjIi2UIilwdw48gXh0kcZ5ex3Rc+COJsJmJ4SNpf42uYea3aUqb1hedTv5xzJrq5Q55p0P5g==
|
||||
|
||||
mongodb@^3.2.3:
|
||||
version "3.7.2"
|
||||
|
@ -384,22 +405,6 @@ revolt-api@^0.5.3-alpha.8-patch.0:
|
|||
resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.3-alpha.8-patch.0.tgz#3c9f981f8100a89aec1299bc110453cf01c51f89"
|
||||
integrity sha512-ghupcB1nJS7fCiD41L4u+QudFoBWGE381uW4s8cuHsQS3bFXgzAH1lgtjYNoFgrVUekqQAcHWote8Kn2sOABAQ==
|
||||
|
||||
revolt.js@^5.1.0-alpha.9:
|
||||
version "5.1.0-alpha.9"
|
||||
resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.1.0-alpha.9.tgz#ce3bff9eb0778160270f8af68c7a64b790cac095"
|
||||
integrity sha512-tBrKvyStA2Q1LTMgyqrOMjAdTYRucE6ZFEZtt5BW6MJ3r7MEMZkqXorU6L/3PE233jqQbHTFDqz8IhyPCfUA3A==
|
||||
dependencies:
|
||||
axios "^0.21.4"
|
||||
eventemitter3 "^4.0.7"
|
||||
exponential-backoff "^3.1.0"
|
||||
isomorphic-ws "^4.0.1"
|
||||
lodash.defaultsdeep "^4.6.1"
|
||||
lodash.isequal "^4.5.0"
|
||||
mobx "^6.3.2"
|
||||
revolt-api "^0.5.3-alpha.8-patch.0"
|
||||
ulid "^2.3.0"
|
||||
ws "^8.2.2"
|
||||
|
||||
safe-buffer@^5.1.1, safe-buffer@^5.1.2:
|
||||
version "5.2.1"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||
|
|
Loading…
Reference in a new issue