mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 08:13:09 +02:00
things
This commit is contained in:
parent
92ec5f2bfc
commit
7cf29040ce
@ -174,7 +174,7 @@ module.exports = class Command {
|
|||||||
* @param {boolean} secret - Ephemeral message? **NOTE: EMBEDS AND ATTACHMENTS DO NOT RENDER IF TRUE**
|
* @param {boolean} secret - Ephemeral message? **NOTE: EMBEDS AND ATTACHMENTS DO NOT RENDER IF TRUE**
|
||||||
*/
|
*/
|
||||||
async sendResponse(interaction, content, secret) {
|
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')
|
if (typeof content === 'object')
|
||||||
send({
|
send({
|
||||||
data: {
|
data: {
|
||||||
|
@ -3,7 +3,7 @@ const EventEmitter = require('events');
|
|||||||
const { Client } = require('discord.js');
|
const { Client } = require('discord.js');
|
||||||
|
|
||||||
/** Manages tickets */
|
/** Manages tickets */
|
||||||
module.exports = class extends EventEmitter {
|
module.exports = class TicketManager extends EventEmitter {
|
||||||
/**
|
/**
|
||||||
* Create a TicketManager instance
|
* Create a TicketManager instance
|
||||||
* @param {Client} client
|
* @param {Client} client
|
||||||
@ -19,8 +19,36 @@ module.exports = class extends EventEmitter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new ticket
|
* 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) {
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user