🎨 Channel + Member + Message + Role in separate collection
This commit is contained in:
+13
-6
@@ -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 {}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,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,
|
||||
|
||||
Reference in New Issue
Block a user