diff options
author | Puyodead1 <puyodead@protonmail.com> | 2022-08-29 11:11:40 -0400 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-12-19 20:37:59 +1100 |
commit | b84aa73852ae1267c9e193cfa6ee365c69d16803 (patch) | |
tree | 645ee5855738495476bfc9c003782ffb7c96d081 /src/util | |
parent | Configurable MFA backup token length (diff) | |
download | server-b84aa73852ae1267c9e193cfa6ee365c69d16803.tar.xz |
implement guild profiles and fix user profiles
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/entities/Member.ts | 15 | ||||
-rw-r--r-- | src/util/schemas/MemberChangeProfileSchema.ts | 5 | ||||
-rw-r--r-- | src/util/schemas/MemberChangeSchema.ts | 2 | ||||
-rw-r--r-- | src/util/schemas/UserProfileModifySchema.ts | 5 | ||||
-rw-r--r-- | src/util/schemas/index.ts | 10 |
5 files changed, 36 insertions, 1 deletions
diff --git a/src/util/entities/Member.ts b/src/util/entities/Member.ts index ae2a6803..1c8bfbef 100644 --- a/src/util/entities/Member.ts +++ b/src/util/entities/Member.ts @@ -114,7 +114,19 @@ export class Member extends BaseClassWithoutId { // do not auto-kick force-joined members just because their joiners left the server }) **/ @Column({ nullable: true }) - joined_by?: string; + joined_by: string; + + @Column({ nullable: true }) + avatar: string; + + @Column({ nullable: true }) + banner: string; + + @Column() + bio: string; + + @Column({ nullable: true }) + communication_disabled_until: Date; // TODO: add this when we have proper read receipts // @Column({ type: "simple-json" }) @@ -313,6 +325,7 @@ export class Member extends BaseClassWithoutId { deaf: false, mute: false, pending: false, + bio: "", }; await Promise.all([ diff --git a/src/util/schemas/MemberChangeProfileSchema.ts b/src/util/schemas/MemberChangeProfileSchema.ts new file mode 100644 index 00000000..3e85174d --- /dev/null +++ b/src/util/schemas/MemberChangeProfileSchema.ts @@ -0,0 +1,5 @@ +export interface MemberChangeProfileSchema { + banner?: string | null; + nick?: string; + bio?: string; +} diff --git a/src/util/schemas/MemberChangeSchema.ts b/src/util/schemas/MemberChangeSchema.ts index 2367bef3..4156c8c1 100644 --- a/src/util/schemas/MemberChangeSchema.ts +++ b/src/util/schemas/MemberChangeSchema.ts @@ -1,4 +1,6 @@ export interface MemberChangeSchema { roles?: string[]; nick?: string; + avatar?: string | null; + bio?: string; } diff --git a/src/util/schemas/UserProfileModifySchema.ts b/src/util/schemas/UserProfileModifySchema.ts new file mode 100644 index 00000000..33a372c9 --- /dev/null +++ b/src/util/schemas/UserProfileModifySchema.ts @@ -0,0 +1,5 @@ +export interface UserProfileModifySchema { + bio?: string; + accent_color?: number | null; + banner?: string | null; +} diff --git a/src/util/schemas/index.ts b/src/util/schemas/index.ts index 58565496..a03cebe2 100644 --- a/src/util/schemas/index.ts +++ b/src/util/schemas/index.ts @@ -22,6 +22,11 @@ export * from "./TemplateModifySchema"; export * from "./VanityUrlSchema"; export * from "./GuildUpdateWelcomeScreenSchema"; export * from "./WidgetModifySchema"; +export * from "./IdentifySchema"; +export * from "./InviteCreateSchema"; +export * from "./LazyRequestSchema"; +export * from "./LoginSchema"; +export * from "./MemberChangeProfileSchema"; export * from "./MemberChangeSchema"; export * from "./RoleModifySchema"; export * from "./GuildTemplateCreateSchema"; @@ -34,6 +39,11 @@ export * from "./MfaCodesSchema"; export * from "./TotpDisableSchema"; export * from "./TotpEnableSchema"; export * from "./VoiceIdentifySchema"; +export * from "./TotpSchema"; +export * from "./UserModifySchema"; +export * from "./UserProfileModifySchema"; +export * from "./UserSettingsSchema"; +export * from "./VanityUrlSchema"; export * from "./VoiceStateUpdateSchema"; export * from "./VoiceVideoSchema"; export * from "./IdentifySchema"; |