summary refs log tree commit diff
path: root/src/models/Role.ts
diff options
context:
space:
mode:
authorxnacly <matteogropp@gmail.com>2021-04-08 15:56:11 +0200
committerxnacly <matteogropp@gmail.com>2021-04-08 15:56:11 +0200
commitf01fe1ba3ac22d33ecf61659d1f65c5ac1ba4e17 (patch)
tree1a3361f31dbbf700efb84513c95388cfbfb2e58f /src/models/Role.ts
parentadded hasThrow (diff)
parent:bug: move dev dependencies to normal (diff)
downloadserver-f01fe1ba3ac22d33ecf61659d1f65c5ac1ba4e17.tar.xz
Merge branch 'main' of https://github.com/fosscord/fosscord-server-util
Diffstat (limited to 'src/models/Role.ts')
-rw-r--r--src/models/Role.ts15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/models/Role.ts b/src/models/Role.ts

index fe716593..84ad55d0 100644 --- a/src/models/Role.ts +++ b/src/models/Role.ts
@@ -2,8 +2,8 @@ import { Schema, model, Types, Document } from "mongoose"; import db from "../util/Database"; export interface Role { - id: bigint; - guild_id: bigint; + id: string; + guild_id: string; color: number; hoist: boolean; managed: boolean; @@ -12,17 +12,17 @@ export interface Role { permissions: bigint; position: number; tags?: { - bot_id?: bigint; + bot_id?: string; }; } export interface RoleDocument extends Document, Role { - id: bigint; + id: string; } export const RoleSchema = new Schema({ - id: Types.Long, - guild_id: Types.Long, + id: String, + guild_id: String, color: Number, hoist: Boolean, managed: Boolean, @@ -31,9 +31,10 @@ export const RoleSchema = new Schema({ permissions: Types.Long, position: Number, tags: { - bot_id: Types.Long, + bot_id: String, }, }); +RoleSchema.set("removeResponse", ["guild_id"]); // @ts-ignore export const RoleModel = db.model<RoleDocument>("Role", RoleSchema, "roles");