diff options
Diffstat (limited to 'src/util/entities')
-rw-r--r-- | src/util/entities/Channel.ts | 4 | ||||
-rw-r--r-- | src/util/entities/Guild.ts | 4 | ||||
-rw-r--r-- | src/util/entities/Invite.ts | 2 | ||||
-rw-r--r-- | src/util/entities/PluginConfig.ts | 2 | ||||
-rw-r--r-- | src/util/entities/Session.ts | 6 | ||||
-rw-r--r-- | src/util/entities/User.ts | 2 | ||||
-rw-r--r-- | src/util/entities/VoiceState.ts | 2 | ||||
-rw-r--r-- | src/util/entities/index.ts | 6 |
8 files changed, 12 insertions, 16 deletions
diff --git a/src/util/entities/Channel.ts b/src/util/entities/Channel.ts index b17fdba0..c803b1b2 100644 --- a/src/util/entities/Channel.ts +++ b/src/util/entities/Channel.ts @@ -359,8 +359,8 @@ export class Channel extends BaseClass { } static async deleteChannel(channel: Channel) { - await Message.delete({ channel_id: channel.id }); //TODO we should also delete the attachments from the cdn but to do that we need to move cdn.ts in util - //TODO before deleting the channel we should check and delete other relations + await Message.delete({ channel_id: channel.id }); //TODO: we should also delete the attachments from the cdn but to do that we need to move cdn.ts in util + //TODO: before deleting the channel we should check and delete other relations await Channel.delete({ id: channel.id }); } diff --git a/src/util/entities/Guild.ts b/src/util/entities/Guild.ts index cd7fa561..9edd3753 100644 --- a/src/util/entities/Guild.ts +++ b/src/util/entities/Guild.ts @@ -18,7 +18,7 @@ import { Webhook } from "./Webhook"; // TODO: guild_scheduled_events // TODO: stage_instances // TODO: threads -// TODO: +// TODO: implement keywords // "keywords": [ // "Genshin Impact", // "Paimon", @@ -75,7 +75,7 @@ export class Guild extends BaseClass { explicit_content_filter?: number = Config.get().defaults.guild.explicitContentFilter; @Column({ type: "simple-array" }) - features: string[]; //TODO use enum + features: string[]; //TODO: use enum //TODO: https://discord.com/developers/docs/resources/guild#guild-object-guild-features @Column({ nullable: true }) diff --git a/src/util/entities/Invite.ts b/src/util/entities/Invite.ts index f6ba85d7..ccb0099a 100644 --- a/src/util/entities/Invite.ts +++ b/src/util/entities/Invite.ts @@ -1,5 +1,5 @@ -import { random } from "@fosscord/api"; import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn, RelationId } from "typeorm"; +import { random } from ".."; import { BaseClassWithoutId } from "./BaseClass"; import { Channel } from "./Channel"; import { Guild } from "./Guild"; diff --git a/src/util/entities/PluginConfig.ts b/src/util/entities/PluginConfig.ts index 87de5167..2fb0c0c2 100644 --- a/src/util/entities/PluginConfig.ts +++ b/src/util/entities/PluginConfig.ts @@ -8,4 +8,4 @@ export class PluginConfigEntity extends BaseClassWithoutId { @Column({ type: "simple-json", nullable: true }) value: number | boolean | null | string | Date | undefined; -} \ No newline at end of file +} diff --git a/src/util/entities/Session.ts b/src/util/entities/Session.ts index 0cb4c309..43945466 100644 --- a/src/util/entities/Session.ts +++ b/src/util/entities/Session.ts @@ -4,7 +4,7 @@ import { Status } from "../interfaces/Status"; import { BaseClass } from "./BaseClass"; import { User } from "./User"; -//TODO we need to remove all sessions on server start because if the server crashes without closing websockets it won't delete them +//TODO: we need to remove all sessions on server start because if the server crashes without closing websockets it won't delete them @Entity("sessions") export class Session extends BaseClass { @@ -18,7 +18,7 @@ export class Session extends BaseClass { }) user: User; - //TODO check, should be 32 char long hex string + //TODO: check, should be 32 char long hex string @Column({ nullable: false, select: false }) session_id: string; @@ -34,7 +34,7 @@ export class Session extends BaseClass { }; @Column({ nullable: false, type: "varchar" }) - status: Status; //TODO enum + status: Status; //TODO: enum } export const PrivateSessionProjection: (keyof Session)[] = ["user_id", "session_id", "activities", "client_info", "status"]; diff --git a/src/util/entities/User.ts b/src/util/entities/User.ts index 57afb132..21ed14f4 100644 --- a/src/util/entities/User.ts +++ b/src/util/entities/User.ts @@ -250,7 +250,7 @@ export class User extends BaseClass { * date_of_birth, * req, * } - * @return {*} + * @return {*} * @memberof User */ static async register({ diff --git a/src/util/entities/VoiceState.ts b/src/util/entities/VoiceState.ts index baf2c687..23cab248 100644 --- a/src/util/entities/VoiceState.ts +++ b/src/util/entities/VoiceState.ts @@ -42,7 +42,7 @@ export class VoiceState extends BaseClass { // @ManyToOne(() => Member, { // onDelete: "CASCADE", // }) - //TODO find a way to make it work without breaking Guild.voice_states + //TODO: find a way to make it work without breaking Guild.voice_states member: Member; @Column() diff --git a/src/util/entities/index.ts b/src/util/entities/index.ts index 444a7e49..d2820c58 100644 --- a/src/util/entities/index.ts +++ b/src/util/entities/index.ts @@ -16,6 +16,7 @@ export * from "./Member"; export * from "./Message"; export * from "./Migration"; export * from "./Note"; +export * from "./PluginConfig"; export * from "./RateLimit"; export * from "./ReadState"; export * from "./Recipient"; @@ -31,8 +32,3 @@ export * from "./User"; export * from "./UserSettings"; export * from "./VoiceState"; export * from "./Webhook"; -export * from "./ClientRelease"; -export * from "./BackupCodes"; -export * from "./Note"; -export * from "./UserSettings"; -export * from "./PluginConfig"; |