create tags

This commit is contained in:
MathMan05 committed 2026-02-05 10:50:48 -06:00
1 parent 9e5976a4d5
commit c26b0f3a4c
7 files changed
+112 -2

No files matched your search

+3
View File
@@ -593,6 +593,9 @@ export class Channel extends BaseClass {
isThread() {
return this.type === ChannelType.GUILD_NEWS_THREAD || this.type === ChannelType.GUILD_PUBLIC_THREAD || this.type === ChannelType.GUILD_PRIVATE_THREAD;
}
isForum() {
return this.type === ChannelType.GUILD_FORUM || this.type === ChannelType.GUILD_MEDIA;
}
isPrivateThread() {
return this.type === ChannelType.GUILD_PRIVATE_THREAD;
+2 -2
View File
@@ -39,10 +39,10 @@ export class Tag extends BaseClass {
@Column()
moderated: boolean = false;
@Column()
@Column({ nullable: true })
emoji_id?: string;
@Column()
@Column({ nullable: true })
emoji_name?: string;
toJSON() {
@@ -0,0 +1,15 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class NullableTags1770310028511 implements MigrationInterface {
name = "NullableTags1770310028511";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "tags" ALTER COLUMN "emoji_id" DROP NOT NULL`);
await queryRunner.query(`ALTER TABLE "tags" ALTER COLUMN "emoji_name" DROP NOT NULL`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "tags" ALTER COLUMN "emoji_name" SET NOT NULL`);
await queryRunner.query(`ALTER TABLE "tags" ALTER COLUMN "emoji_id" SET NOT NULL`);
}
}