fix: add Escalate button to email ticket welcome embed
gmail-poll.js was hand-rolling its own Close+Claim-only action row.
Replaced with getTicketActionRow({ escalationTier: 0 }) — same helper
panel-created tickets use. Email and Discord tickets now show identical
buttons on creation: Close, Claim, Escalate.
This commit is contained in:
@@ -3,9 +3,7 @@
|
||||
*/
|
||||
const {
|
||||
ChannelType,
|
||||
ActionRowBuilder,
|
||||
ButtonBuilder,
|
||||
ButtonStyle,
|
||||
|
||||
EmbedBuilder
|
||||
} = require('discord.js');
|
||||
const { mongoose, withRetry } = require('./db-connection');
|
||||
@@ -23,6 +21,7 @@ const { getGmailClient } = require('./services/gmail');
|
||||
const { getNextTicketNumber, checkTicketLimits, getOrCreateTicketCategory, toDiscordSafeName, getSenderLocal } = require('./services/tickets');
|
||||
const { logError, logGmail, logAutomation } = require('./services/debugLog');
|
||||
const { enqueueSend } = require('./services/channelQueue');
|
||||
const { getTicketActionRow } = require('./utils/ticketComponents');
|
||||
|
||||
const Ticket = mongoose.model('Ticket');
|
||||
const Transcript = mongoose.model('Transcript');
|
||||
@@ -230,18 +229,7 @@ async function poll(client) {
|
||||
? GAME_NAME_TO_KEY[detectedGame] || null
|
||||
: null;
|
||||
|
||||
const buttons = new ActionRowBuilder().addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId('close_ticket')
|
||||
.setLabel(CONFIG.BUTTON_LABEL_CLOSE)
|
||||
.setEmoji(CONFIG.BUTTON_EMOJI_CLOSE)
|
||||
.setStyle(ButtonStyle.Secondary),
|
||||
new ButtonBuilder()
|
||||
.setCustomId('claim_ticket')
|
||||
.setLabel(CONFIG.BUTTON_LABEL_CLAIM)
|
||||
.setEmoji(CONFIG.BUTTON_EMOJI_CLAIM)
|
||||
.setStyle(ButtonStyle.Secondary)
|
||||
);
|
||||
const buttons = getTicketActionRow({ escalationTier: 0 });
|
||||
|
||||
const ticketInfoEmbed = new EmbedBuilder()
|
||||
.setColor(CONFIG.EMBED_COLOR_INFO)
|
||||
|
||||
Reference in New Issue
Block a user