MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / getUserTicketCount

Function getUserTicketCount

src/services/ticket.js:43–62  ·  view source on GitHub ↗
(guildId, userId)

Source from the content-addressed store, hash-verified

41}
42
43export async function getUserTicketCount(guildId, userId) {
44 try {
45 return await getOpenTicketCountForUser(guildId, userId);
46 } catch (error) {
47 const typedError = ensureTypedServiceError(error, {
48 service: 'ticketService',
49 operation: 'getUserTicketCount',
50 message: 'Ticket operation failed: getUserTicketCount',
51 userMessage: 'Failed to count open tickets.',
52 context: { guildId, userId }
53 });
54 logger.error('Error counting user tickets:', {
55 guildId,
56 userId,
57 error: typedError.message,
58 errorCode: typedError.context?.errorCode
59 });
60 return 0;
61 }
62}
63
64export async function createTicket(guild, member, categoryId, reason = 'No reason provided', priority = 'none') {
65 try {

Callers 3

handleCheckUserFunction · 0.90
createTicketFunction · 0.85
executeFunction · 0.85

Calls 2

ensureTypedServiceErrorFunction · 0.90

Tested by

no test coverage detected