mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-09 19:31:27 +03:00
Add message and ticket referencing, fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const { SlashCommand } = require('@eartharoid/dbf');
|
||||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
const { useGuild } = require('../../lib/tickets/utils');
|
||||
|
||||
module.exports = class NewSlashCommand extends SlashCommand {
|
||||
constructor(client, options) {
|
||||
@@ -14,7 +15,7 @@ module.exports = class NewSlashCommand extends SlashCommand {
|
||||
autocomplete: true,
|
||||
name: 'references',
|
||||
required: false,
|
||||
type: ApplicationCommandOptionType.Integer,
|
||||
type: ApplicationCommandOptionType.String,
|
||||
},
|
||||
];
|
||||
opts = opts.map(o => {
|
||||
@@ -43,5 +44,12 @@ module.exports = class NewSlashCommand extends SlashCommand {
|
||||
});
|
||||
}
|
||||
|
||||
async run(interaction) { }
|
||||
/**
|
||||
*
|
||||
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
||||
*/
|
||||
async run(interaction) {
|
||||
await useGuild(this.client, interaction, { referencesTicketId: interaction.options.getString('references', false) });
|
||||
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user