1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-23 02:42:28 +01:00

move guild arrays into seperate collections

This commit is contained in:
Flam3rboy 2021-02-12 15:13:02 +01:00
parent 6a1d196565
commit f572c7142b
8 changed files with 22 additions and 15 deletions

View File

@ -2,7 +2,7 @@ import { User } from "..";
import { ClientStatus, Status } from "./Status";
export interface Presence {
user: User;
guild_id: bigint;
guild_id?: bigint;
status: Status;
activities: Activity[];
client_status: ClientStatus;

View File

@ -14,7 +14,7 @@ export interface Event {
guild_id?: bigint;
user_id?: bigint;
channel_id?: bigint;
created_at: number;
created_at?: number;
event: EVENT;
data?: any;
}

View File

@ -1,13 +1,9 @@
import { GuildChannel } from "./Channel";
import { Emoji } from "./Emoji";
import { Member } from "./Member";
import { Role } from "./Role";
export interface Guild {
afk_channel_id?: bigint;
afk_timeout?: number;
application_id?: bigint;
banner?: string;
channels: GuildChannel[];
default_message_notifications?: number;
description?: string;
discovery_splash?: string;
@ -22,17 +18,14 @@ export interface Guild {
max_video_channel_users?: number;
member_count?: number;
presence_count?: number;
members?: Member[];
mfa_level?: number;
name: string;
owner_id: bigint;
preferred_locale?: string;
premium_subscription_count?: number;
premium_tier?: number;
presences: [];
public_updates_channel_id?: bigint;
region?: string;
roles: Role[];
rules_channel_id?: bigint;
splash?: string;
system_channel_flags?: number;

View File

@ -1,3 +1,5 @@
import { Activity } from "./Activity";
import { ClientStatus, Status } from "./Status";
export interface User {
id: bigint;
username: string;
@ -23,6 +25,11 @@ export interface User {
user_settings: UserSettings;
relationships: Relationship[];
connected_accounts: ConnectedAccount[];
presence: {
status: Status;
activities: Activity[];
client_status: ClientStatus;
};
}
export interface PublicUser {
id: bigint;

View File

@ -3,7 +3,7 @@ import { ClientStatus, Status } from "./Status";
export interface Presence {
user: User;
guild_id: bigint;
guild_id?: bigint;
status: Status;
activities: Activity[];
client_status: ClientStatus;

View File

@ -15,7 +15,7 @@ export interface Event {
guild_id?: bigint;
user_id?: bigint;
channel_id?: bigint;
created_at: number;
created_at?: number;
event: EVENT;
data?: any;
}

View File

@ -8,7 +8,6 @@ export interface Guild {
afk_timeout?: number;
application_id?: bigint;
banner?: string;
channels: GuildChannel[];
default_message_notifications?: number;
description?: string;
discovery_splash?: string;
@ -24,17 +23,17 @@ export interface Guild {
max_video_channel_users?: number; // ? default: 25, is this max 25 streaming or watching
member_count?: number;
presence_count?: number; // users online
members?: Member[];
// members?: Member[]; // * Members are stored in a seperate collection
// roles: Role[]; // * Role are stroed in a seperate collection
// channels: GuildChannel[]; // * Channels are stroed in a seperate collection
mfa_level?: number;
name: string;
owner_id: bigint;
preferred_locale?: string; // only community guilds can choose this
premium_subscription_count?: number;
premium_tier?: number; // nitro boost level
presences: []; // TODO: add model
public_updates_channel_id?: bigint;
region?: string;
roles: Role[];
rules_channel_id?: bigint;
splash?: string;
system_channel_flags?: number;

View File

@ -1,3 +1,6 @@
import { Activity } from "./Activity";
import { ClientStatus, Status } from "./Status";
export interface User {
id: bigint;
username: string;
@ -23,6 +26,11 @@ export interface User {
user_settings: UserSettings;
relationships: Relationship[];
connected_accounts: ConnectedAccount[];
presence: {
status: Status;
activities: Activity[];
client_status: ClientStatus;
};
}
export interface PublicUser {