summary refs log tree commit diff
path: root/src/models/Role.ts
diff options
context:
space:
mode:
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");