🎨 Channel + Member + Message + Role in separate collection

This commit is contained in:
Flam3rboy
2021-02-13 23:57:02 +01:00
parent 4125b7810d
commit 52964aed06
20 changed files with 142 additions and 18 deletions
+13 -6
View File
@@ -47,12 +47,19 @@ export interface GuildChannel extends Channel {
guild_id: bigint;
position: number;
parent_id?: bigint;
permission_overwrites: {
allow: bigint;
deny: bigint;
id: bigint;
type: number;
}[];
permission_overwrites: ChannelPermissionOverwrite[];
}
export interface ChannelPermissionOverwrite {
allow: bigint;
deny: bigint;
id: bigint;
type: ChannelPermissionOverwriteType;
}
export enum ChannelPermissionOverwriteType {
role = 0,
member = 1,
}
export interface VoiceChannel extends GuildChannel {}
+2
View File
@@ -3,6 +3,7 @@ import { Schema, model, Types, Document } from "mongoose";
export interface Member extends Document {
id: bigint;
guild_id: bigint;
nick?: string;
roles: bigint[];
joined_at: number;
@@ -42,6 +43,7 @@ const MuteConfig = {
export const MemberSchema = new Schema({
id: Types.Long,
guild_id: Types.Long,
nick: String,
roles: [Types.Long],
joined_at: Number,
+2
View File
@@ -3,6 +3,7 @@ import { ChannelType } from "./Channel";
export interface Message extends Document {
id: bigint;
channel_id: bigint;
author_id?: bigint;
webhook_id?: bigint;
application_id: bigint;
@@ -188,6 +189,7 @@ const Embed = {
export const MessageSchema = new Schema({
id: Types.Long,
channel_id: Types.Long,
author_id: Types.Long,
webhook_id: Types.Long,
application_id: Types.Long,
+2
View File
@@ -2,6 +2,7 @@ import { Schema, model, Types, Document } from "mongoose";
export interface Role extends Document {
id: bigint;
guild_id: bigint;
color: number;
hoist: boolean;
managed: boolean;
@@ -16,6 +17,7 @@ export interface Role extends Document {
export const RoleSchema = new Schema({
id: Types.Long,
guild_id: Types.Long,
color: Number,
hoist: Boolean,
managed: Boolean,