From ed12120f1b4f1e012694d2cbd945edb064eabe37 Mon Sep 17 00:00:00 2001 From: Isaac Date: Sat, 20 Feb 2021 21:27:49 +0000 Subject: [PATCH] Fix thing, add number column to tickets --- src/commands/new.js | 3 +-- src/database/index.js | 7 ++++++- src/modules/commands/command.js | 12 ++++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/commands/new.js b/src/commands/new.js index 600e4ac..61df97e 100644 --- a/src/commands/new.js +++ b/src/commands/new.js @@ -34,7 +34,6 @@ module.exports = class NewCommand extends Command { return new MessageEmbed() .setColor(settings.colour) - .setTitle(i18n('bot.version', require('../../package.json').version)) - .secret = true; + .setTitle(i18n('bot.version', require('../../package.json').version)); } }; \ No newline at end of file diff --git a/src/database/index.js b/src/database/index.js index bc19024..79fd575 100644 --- a/src/database/index.js +++ b/src/database/index.js @@ -85,6 +85,11 @@ module.exports = async (log) => { primaryKey: true, allowNull: false, }, + number: { + type: DataTypes.INTEGER, + autoIncrement: true, + allowNull: false, + }, guild: { type: DataTypes.STRING, allowNull: false, @@ -92,7 +97,7 @@ module.exports = async (log) => { model: Guild, key: 'id' }, - } + }, }, { tableName: DB_TABLE_PREFIX + 'tickets' }); diff --git a/src/modules/commands/command.js b/src/modules/commands/command.js index 30f1ed8..9ebb45e 100644 --- a/src/modules/commands/command.js +++ b/src/modules/commands/command.js @@ -152,7 +152,9 @@ module.exports = class Command { this.client.api.interactions(interaction.id, interaction.token).callback.post({ data: { type: 5, - flags: flags(secret), + data: { + flags: flags(secret) + }, } }); } @@ -168,16 +170,18 @@ module.exports = class Command { this.client.api.interactions(interaction.id, interaction.token).callback.post({ data: { type: 4, - flags: flags(secret), - data: await createMessage(this.client, interaction.channel_id, content) + data: { + flags: flags(secret), + ...await createMessage(this.client, interaction.channel_id, content) + } } }); else this.client.api.interactions(interaction.id, interaction.token).callback.post({ data: { type: 4, - flags: flags(secret), data: { + flags: flags(secret), content } }