This commit is contained in:
Isaac 2021-02-22 23:40:16 +00:00
parent 92ec5f2bfc
commit 7cf29040ce
2 changed files with 31 additions and 3 deletions

View File

@ -174,7 +174,7 @@ module.exports = class Command {
* @param {boolean} secret - Ephemeral message? **NOTE: EMBEDS AND ATTACHMENTS DO NOT RENDER IF TRUE**
*/
async sendResponse(interaction, content, secret) {
const send = this.client.api.interactions(interaction.id, interaction.token).messages['@original'].patch;
const send = this.client.api.webhooks(this.client.fetchApplication().id, interaction.token).messages['@original'].patch;
if (typeof content === 'object')
send({
data: {

View File

@ -3,7 +3,7 @@ const EventEmitter = require('events');
const { Client } = require('discord.js');
/** Manages tickets */
module.exports = class extends EventEmitter {
module.exports = class TicketManager extends EventEmitter {
/**
* Create a TicketManager instance
* @param {Client} client
@ -19,8 +19,36 @@ module.exports = class extends EventEmitter {
/**
* Create a new ticket
* @param {string} guild - ID of the guild to create the ticket in
* @param {string} creator - ID of the ticket creator (user)
* @param {string} category - ID of the ticket category
* @param {string} [topic] - The ticket topic
*/
async create() {
async create(guild, creator, category, topic) {
}
/**
* Get a ticket
* @param {string} ticket - The channel ID, or the ticket number
*/
async get(ticket) {
}
/**
* Close a ticket
* @param {string} ticket - The channel ID, or the ticket number
*/
async close(ticket) {
}
/**
* Close multiple tickets
* @param {string[]} tickets - An array of channel IDs to close **(does not accept ticket numbers)**
*/
async closeMultiple(tickets) {
}
};