1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 20:52:42 +01:00

🐛 fix types + prod env

This commit is contained in:
Flam3rboy 2021-10-18 21:10:03 +02:00
parent d504cdf0ee
commit 4bae3909e3
2 changed files with 3 additions and 10 deletions

View File

@ -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

View File

@ -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