2021-02-13 14:15:59 +01:00
|
|
|
/// <reference path="../util/MongoBigInt.d.ts" />
|
2021-02-22 21:30:38 +01:00
|
|
|
import { PublicUser, User } from "./User";
|
2021-02-13 14:15:59 +01:00
|
|
|
import { Schema, Document } from "mongoose";
|
2021-02-14 20:16:49 +01:00
|
|
|
export interface Member {
|
2021-02-11 08:33:46 +01:00
|
|
|
id: bigint;
|
2021-02-13 23:57:02 +01:00
|
|
|
guild_id: bigint;
|
2021-02-11 08:33:46 +01:00
|
|
|
nick?: string;
|
|
|
|
roles: bigint[];
|
2021-03-08 18:41:31 +01:00
|
|
|
joined_at: Date;
|
2021-02-11 08:33:46 +01:00
|
|
|
premium_since?: number;
|
2021-02-05 22:01:01 +01:00
|
|
|
deaf: boolean;
|
|
|
|
mute: boolean;
|
|
|
|
pending: boolean;
|
2021-02-11 20:44:26 +01:00
|
|
|
settings: UserGuildSettings;
|
2021-02-22 21:30:38 +01:00
|
|
|
user?: User;
|
2021-02-11 20:44:26 +01:00
|
|
|
}
|
2021-02-14 20:16:49 +01:00
|
|
|
export interface MemberDocument extends Member, Document {
|
|
|
|
id: bigint;
|
|
|
|
}
|
2021-02-11 20:44:26 +01:00
|
|
|
export interface UserGuildSettings {
|
|
|
|
channel_overrides: {
|
|
|
|
channel_id: bigint;
|
|
|
|
message_notifications: number;
|
|
|
|
mute_config: MuteConfig;
|
|
|
|
muted: boolean;
|
|
|
|
}[];
|
|
|
|
message_notifications: number;
|
|
|
|
mobile_push: boolean;
|
|
|
|
mute_config: MuteConfig;
|
|
|
|
muted: boolean;
|
|
|
|
suppress_everyone: boolean;
|
|
|
|
suppress_roles: boolean;
|
|
|
|
version: number;
|
|
|
|
}
|
|
|
|
export interface MuteConfig {
|
|
|
|
end_time: number;
|
|
|
|
selected_time_window: number;
|
2021-02-05 22:01:01 +01:00
|
|
|
}
|
2021-02-13 14:15:59 +01:00
|
|
|
export declare const MemberSchema: Schema<Document<any>, import("mongoose").Model<Document<any>>, undefined>;
|
2021-02-14 20:16:49 +01:00
|
|
|
export declare const MemberModel: import("mongoose").Model<MemberDocument>;
|
2021-02-13 14:15:59 +01:00
|
|
|
export interface PublicMember extends Omit<Member, "settings" | "id"> {
|
|
|
|
user: PublicUser;
|
|
|
|
}
|