Add custom shortcut support

This commit is contained in:
Max Isom 2020-03-16 19:37:54 -05:00
parent 5eb1389a6f
commit 32cb3ca4ae
7 changed files with 152 additions and 23 deletions

View file

@ -1,5 +1,7 @@
import Settings from './settings';
import Shortcut from './shortcut';
export {
Settings
Settings,
Shortcut
};

23
src/models/shortcut.ts Normal file
View file

@ -0,0 +1,23 @@
import {Table, Column, PrimaryKey, Model, AutoIncrement, Index} from 'sequelize-typescript';
@Table
export default class Shortcut extends Model<Shortcut> {
@PrimaryKey
@AutoIncrement
@Column
id!: number;
@Column
@Index
guildId!: string;
@Column
authorId!: string;
@Column
@Index
shortcut!: string;
@Column
command!: string;
}