Skip to content

Defer interaction replies to avoid timeouts and add payment/support flows - #3

Open
Ignius14 wants to merge 2 commits into
v14from
codex/create-discord-ticket-bot-in-javascript-o0lyzv
Open

Defer interaction replies to avoid timeouts and add payment/support flows#3
Ignius14 wants to merge 2 commits into
v14from
codex/create-discord-ticket-bot-in-javascript-o0lyzv

Conversation

@Ignius14

@Ignius14 Ignius14 commented Jan 6, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Prevent interaction timeout errors by deferring replies for button and modal handlers.
  • Provide a complete buy/support workflow including payment monitoring, QR generation, and webhook delivery.
  • Expose admin commands to manage pricing and confirm payments and make panels easy to create.
  • Ship a localized startup tutorial and example .env so operators can configure and run the bot.

Description

  • Updated src/Events/interactionCreate.js to call deferReply({ ephemeral: true }) for buy/payment and modal flows and to use editReply for follow-up messages.
  • Added services: src/Services/paymentMonitor.js, pricingService.js, qrService.js, buyRequestStore.js, and buyPanelService.js to handle rate fetching, payment registration/checking, QR generation, and buy-panel embedding.
  • Added commands and constants: src/Commands/tickets/buy-panel.js, panel-support.js, src/Commands/admin/setprice.js, confirm-payment.js, and src/Constants/customIds.js, plus config updates in src/Base/config.js and a .env example.
  • Misc: added index.js, updated package.json (added qrcode and a test script), included a Lithuanian startup section in README.md, and included tests/pricingService.test.js covering pricingService behavior.

Testing

  • Added unit tests tests/pricingService.test.js for getLiveRates, getPriceEur, and setPriceEur.
  • No automated tests were executed as part of this change (tests were added but not run).
  • Basic lint/format scripts remain available via npm run lint and npm run format but were not executed.
  • Manual runtime validation was not recorded in automated test output.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant