Fix thing, add number column to tickets

This commit is contained in:
Isaac 2021-02-20 21:27:49 +00:00
parent 5e9e23bbf2
commit ed12120f1b
No known key found for this signature in database
GPG Key ID: 279D1F53391CED07
3 changed files with 15 additions and 7 deletions

View File

@ -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));
}
};

View File

@ -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'
});

View File

@ -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,
data: {
flags: flags(secret),
data: await createMessage(this.client, interaction.channel_id, content)
...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
}
}