diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-18 21:10:03 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-18 21:10:03 +0200 |
commit | cea121fe3fd9686feb5146661621ef0adb7f738e (patch) | |
tree | 74addc73f443a02062c7fcaa8c82ee089713b63b | |
parent | :zap: message performance (diff) | |
download | server-cea121fe3fd9686feb5146661621ef0adb7f738e.tar.xz |
:bug: fix types + prod env
-rw-r--r-- | bundle/src/Server.ts | 2 | ||||
-rw-r--r-- | gateway/src/opcodes/LazyRequest.ts | 11 |
2 files changed, 3 insertions, 10 deletions
diff --git a/bundle/src/Server.ts b/bundle/src/Server.ts index f29cd649..e461ec5f 100644 --- a/bundle/src/Server.ts +++ b/bundle/src/Server.ts @@ -12,7 +12,7 @@ import { Config, initDatabase } from "@fosscord/util"; const app = express(); const server = http.createServer(); const port = Number(process.env.PORT) || 3001; -const production = true; +const production = process.env.NODE_ENV == "development" ? false : true; server.on("request", app); // @ts-ignore diff --git a/gateway/src/opcodes/LazyRequest.ts b/gateway/src/opcodes/LazyRequest.ts index c304dfe7..2156070f 100644 --- a/gateway/src/opcodes/LazyRequest.ts +++ b/gateway/src/opcodes/LazyRequest.ts @@ -1,11 +1,4 @@ -import { - EVENTEnum, - EventOpts, - getPermission, - listenEvent, - Member, - Role, -} from "@fosscord/util"; +import { getPermission, listenEvent, Member, Role } from "@fosscord/util"; import { LazyRequest } from "../schema/LazyRequest"; import { Send } from "../util/Send"; import { OPCODES } from "../util/Constants"; @@ -47,7 +40,7 @@ async function getMembers(guild_id: string, range: [number, number]) { const member_roles = members .map((m) => m.roles) .flat() - .unique((r) => r.id); + .unique((r: Role) => r.id); for (const role of member_roles) { // @ts-ignore |