This commit is contained in:
Isaac
2021-02-22 00:05:37 +00:00
parent 2910a2a201
commit 18883d5d20
15 changed files with 298 additions and 135 deletions

View File

@@ -174,8 +174,9 @@ 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;
if (typeof content === 'object')
this.client.api.interactions(interaction.id, interaction.token).callback.post({
send({
data: {
type: 4,
data: {
@@ -184,8 +185,8 @@ module.exports = class Command {
}
}
});
else
this.client.api.interactions(interaction.id, interaction.token).callback.post({
else if (typeof content === 'string')
send({
data: {
type: 4,
data: {

View File

@@ -1,4 +1,26 @@
module.exports = {
TicketManager: require('./manager'),
Ticket: require('./ticket'),
const EventEmitter = require('events');
// eslint-disable-next-line no-unused-vars
const { Client } = require('discord.js');
/** Manages tickets */
module.exports = class extends EventEmitter {
/**
* Create a TicketManager instance
* @param {Client} client
*/
constructor(client) {
super();
/** The Discord Client */
this.client = client;
this.setMaxListeners(this.client.config.max_listeners);
}
/**
* Create a new ticket
*/
async create() {
}
};

View File

@@ -1,26 +0,0 @@
const EventEmitter = require('events');
// eslint-disable-next-line no-unused-vars
const { Client } = require('discord.js');
/** Manages tickets */
module.exports = class extends EventEmitter {
/**
* Create a TicketManager instance
* @param {Client} client
*/
constructor(client) {
super();
/** The Discord Client */
this.client = client;
this.setMaxListeners(this.client.config.max_listeners);
}
/**
* Create a new ticket
*/
async create() {
}
};