summary refs log tree commit diff
path: root/src/models/Role.ts
diff options
context:
space:
mode:
authornotsapinho <52896767+notsapinho@users.noreply.github.com>2021-04-08 11:43:26 -0300
committernotsapinho <52896767+notsapinho@users.noreply.github.com>2021-04-08 11:43:26 -0300
commite8c097ef273100c6200c8e814965f2cb02de0bc9 (patch)
tree6cdf25485d11d7aae1a2a4efeab10e2b12ae8b86 /src/models/Role.ts
parentMerge branch 'main' of https://github.com/fosscord/fosscord-server-util (diff)
downloadserver-e8c097ef273100c6200c8e814965f2cb02de0bc9.tar.xz
added toBigInt and BigInt getters to bitfields
Diffstat (limited to 'src/models/Role.ts')
-rw-r--r--src/models/Role.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/models/Role.ts b/src/models/Role.ts

index 84ad55d0..c1111c84 100644 --- a/src/models/Role.ts +++ b/src/models/Role.ts
@@ -1,5 +1,6 @@ import { Schema, model, Types, Document } from "mongoose"; import db from "../util/Database"; +import toBigInt from "../util/toBigInt"; export interface Role { id: string; @@ -28,12 +29,13 @@ export const RoleSchema = new Schema({ managed: Boolean, mentionable: Boolean, name: String, - permissions: Types.Long, + permissions: { type: String, get: toBigInt }, position: Number, tags: { bot_id: String, }, }); + RoleSchema.set("removeResponse", ["guild_id"]); // @ts-ignore