fix registration again
This commit is contained in:
parent
286165548f
commit
214e00d291
@ -12,7 +12,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@discordjs/collection": "^1.2.0",
|
||||
"@navy.gif/commandparser": "^1.4.3",
|
||||
"@navy.gif/commandparser": "^1.4.5",
|
||||
"@navy.gif/logger": "^2.3.3",
|
||||
"@navy.gif/passport-discord": "^0.2.2-b",
|
||||
"@navy.gif/wrappers": "^1.3.9",
|
||||
|
@ -191,9 +191,11 @@ class Controller extends EventEmitter {
|
||||
|
||||
const { command, ...rest } = result;
|
||||
|
||||
if (rest.args.help)
|
||||
// return this.#_logger.info(`COMMAND HELP\n${command.help}`);
|
||||
return this.#_logger.info(`Command help unavailable at this time`);
|
||||
if (rest.args.help) {
|
||||
if (command.help)
|
||||
return command.help;
|
||||
return this.#_logger.info(`Help for ${command.name} unavailable at this time`);
|
||||
}
|
||||
|
||||
let response = null;
|
||||
try {
|
||||
|
@ -245,8 +245,10 @@ class Shard extends EventEmitter {
|
||||
if (this.#_awaitingShutdown)
|
||||
this.#_awaitingShutdown();
|
||||
|
||||
if (code !== 0)
|
||||
this.#_crashes.push(Date.now() - this.spawnedAt);
|
||||
if (code !== 0) {
|
||||
this.#_crashes.push(Date.now() - this.spawnedAt);
|
||||
this.emit('warn', `Shard exited with non-zero exit code`);
|
||||
}
|
||||
|
||||
this.#_ready = false;
|
||||
this.#_process = null;
|
||||
|
@ -16,8 +16,7 @@ class RegisterEndpoint extends ApiEndpoint {
|
||||
|
||||
super(server, {
|
||||
name: 'register',
|
||||
path: '/register',
|
||||
auth: true
|
||||
path: '/register'
|
||||
});
|
||||
|
||||
this.methods = [
|
||||
|
@ -15,7 +15,7 @@ class ApiEndpoint extends Endpoint {
|
||||
path: `/api${opts.path}`
|
||||
});
|
||||
|
||||
// this._middleware.push(this.rateLimiter.throttle({ limit: 5, time: 5, path: this.path.replace(opts.path, ''), endpoint: this }));
|
||||
// this._middleware.push(this.rateLimiter.throttle({ limit: 5, time: 1, path: this.path.replace(opts.path, ''), endpoint: this }));
|
||||
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ import { LoggerClient } from '@navy.gif/logger';
|
||||
import session from 'express-session';
|
||||
import passport from "passport";
|
||||
import MongoStore from "connect-mongo";
|
||||
import { AuthFunction, Request, Response } from "../../../@types/Server.js";
|
||||
import { MiddlewareFunction, Request, Response } from "../../../@types/Server.js";
|
||||
import { NextFunction } from "express";
|
||||
import { User } from "../structures/index.js";
|
||||
|
||||
@ -38,7 +38,7 @@ type OAuthParams = {
|
||||
*/
|
||||
class Authenticator {
|
||||
|
||||
[key: string]: AuthFunction | unknown
|
||||
[key: string]: MiddlewareFunction | unknown
|
||||
|
||||
#_userdb: UserDatabaseInterface;
|
||||
#_cookieName: string;
|
||||
|
10
yarn.lock
10
yarn.lock
@ -1737,10 +1737,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@navy.gif/commandparser@npm:^1.4.3":
|
||||
version: 1.4.3
|
||||
resolution: "@navy.gif/commandparser@npm:1.4.3"
|
||||
checksum: edfd9c82be3497f4eb196ef67dcdf3a4c602df33653e2b9a81cad083271c2df21345a1a5d333f107258527741bde133c29a6a145fb5d81809a1d2c6ddf25c284
|
||||
"@navy.gif/commandparser@npm:^1.4.5":
|
||||
version: 1.4.5
|
||||
resolution: "@navy.gif/commandparser@npm:1.4.5"
|
||||
checksum: d41e6742401e9a5559cc146ee7ce5e511e08050d498e735b5a864e48f5e49f4dcfd10ac8d782db5efe9e010adcaf5e0d44f69bfba08f803518ff43ad467263cb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -7035,7 +7035,7 @@ __metadata:
|
||||
"@babel/core": ^7.20.12
|
||||
"@babel/preset-env": ^7.20.2
|
||||
"@discordjs/collection": ^1.2.0
|
||||
"@navy.gif/commandparser": ^1.4.3
|
||||
"@navy.gif/commandparser": ^1.4.5
|
||||
"@navy.gif/logger": ^2.3.3
|
||||
"@navy.gif/passport-discord": ^0.2.2-b
|
||||
"@navy.gif/wrappers": ^1.3.9
|
||||
|
Loading…
Reference in New Issue
Block a user