feat: use webhooks for logs when possible

This commit is contained in:
Dragory 2021-11-02 19:59:30 +02:00
parent 1081d1b361
commit 55a39e0758
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
12 changed files with 318 additions and 29 deletions

View file

@ -0,0 +1,45 @@
import { MigrationInterface, QueryRunner, Table } from "typeorm";
export class CreateWebhooksTable1635779678653 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: "webhooks",
columns: [
{
name: "id",
type: "bigint",
isPrimary: true,
},
{
name: "guild_id",
type: "bigint",
},
{
name: "channel_id",
type: "bigint",
},
{
name: "token",
type: "text",
},
{
name: "created_at",
type: "datetime",
default: "(NOW())",
},
],
indices: [
{
columnNames: ["channel_id"],
isUnique: true,
},
],
}),
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropTable("webhooks");
}
}