Add warn and mute commands. General code clean-up.

This commit is contained in:
Dragory 2018-07-08 13:57:27 +03:00
parent 28bb8165bc
commit 15b7da82e8
5 changed files with 264 additions and 67 deletions

View file

@ -3,8 +3,8 @@ exports.up = async function(knex) {
await knex.schema.createTable('mutes', table => {
table.bigInteger('guild_id').unsigned().notNullable();
table.bigInteger('user_id').unsigned().notNullable();
table.dateTime('created_at');
table.dateTime('expires_at');
table.dateTime('created_at').defaultTo(knex.raw('NOW()'));
table.dateTime('expires_at').nullable().defaultTo(null);
table.primary(['guild_id', 'user_id']);
table.index(['expires_at']);