Change private help ticket cooldown
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, Client, GuildTextBasedChannel, MessageFlags, ModalSubmitInteraction, TextChannel, ThreadAutoArchiveDuration } from 'discord.js';
|
||||
import { ticketCooldownMap } from '../shared/ticket-cooldown';
|
||||
import { Database } from '../shared/Database';
|
||||
import { logCustomEvent } from '../utils';
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, Client, GuildTextBasedChannel, MessageFlags, ModalSubmitInteraction, TextChannel, ThreadAutoArchiveDuration } from 'discord.js';
|
||||
import { ticketCooldownMap } from '../shared/ticket-cooldown';
|
||||
import { Database } from '../shared/Database';
|
||||
|
||||
export default {
|
||||
@@ -13,8 +12,6 @@ export default {
|
||||
if (!guildSettings || !guildSettings.private_help_role_id)
|
||||
return interaction.reply({ flags: [MessageFlags.Ephemeral], content: 'Failed to create ticket. Please report this to a staff member.' });
|
||||
|
||||
ticketCooldownMap.set(interaction.user.id, Date.now() + 8.64e+7);
|
||||
|
||||
const reason = interaction.fields.getTextInputValue('ticket-message');
|
||||
|
||||
const channel = (await interaction.channel?.fetch()) as TextChannel;
|
||||
@@ -26,6 +23,12 @@ export default {
|
||||
type: ChannelType.PrivateThread
|
||||
});
|
||||
|
||||
console.log(1);
|
||||
|
||||
await Database.createPrivateHelpTicket(interaction.user.id, thread.id);
|
||||
|
||||
console.log(2);
|
||||
|
||||
const closeButton = new ButtonBuilder()
|
||||
.setCustomId('close-ticket')
|
||||
.setLabel('Click here if you no longer need help')
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, Client, GuildTextBasedChannel, MessageFlags, ModalSubmitInteraction, TextChannel, ThreadAutoArchiveDuration } from 'discord.js';
|
||||
import { ticketCooldownMap } from '../shared/ticket-cooldown';
|
||||
import { Database } from '../shared/Database';
|
||||
import { deferInteraction, logCustomEvent, syncName } from '../utils';
|
||||
import { config } from '../config';
|
||||
|
||||
Reference in New Issue
Block a user