Add --exclusive/-e to !reaction_roles
When reaction roles are set as exclusive, a user can only have 1 reaction role from that message. Others are removed automatically when picking a role if needed.
This commit is contained in:
parent
546835d421
commit
d2a6cb1684
4 changed files with 42 additions and 4 deletions
|
@ -0,0 +1,19 @@
|
|||
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
|
||||
|
||||
export class AddIsExclusiveToReactionRoles1575145703039 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||
await queryRunner.addColumn(
|
||||
"reaction_roles",
|
||||
new TableColumn({
|
||||
name: "is_exclusive",
|
||||
type: "tinyint",
|
||||
unsigned: true,
|
||||
default: 0,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<any> {
|
||||
await queryRunner.dropColumn("reaction_roles", "is_exclusive");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue