Discord Membership & Role Bot Kit: Redeem Codes, Auto-Expiry, Tickets (Source Code)
Turn any sale into a Discord role. Members run /redeem with a code or a Gumroad license key and instantly get the role. When access ends, the role is removed automatically. It also includes a private support-ticket system.
WHAT IT DOES
• /redeem: single- or multi-use access codes (e.g. VIP-7K2M-Q9XD-4HTR), N days or lifetime
• Optional Gumroad license keys → roles (refunds and charge-backs refused, one key per Discord account)
• Expiry engine: reminder DM before expiry, automatic role removal at expiry, buying again stacks time
• /ticket opens a private thread in your support channel and pings your support role; /close archives it
• Admin slash commands (Manage Server): /keys create | list | revoke, /grant, /revoke, /members, /sweep
• /membership shows members their roles and expiry dates; optional audit-log channel
WHAT YOU GET
• Full TypeScript source using Discord's HTTP Interactions endpoint (no gateway, nothing to keep online) on Cloudflare Workers + D1 + Cron (free tier)
• ed25519 request-signature verification with WebCrypto (required by Discord), deferred responses for slow work
• One-click /register (slash commands) and /invite (bot invite with the right permissions) pages
• README: Developer Portal → secrets → D1 migration → Interactions URL → role order
• Test suite (Vitest, 11 tests incl. real ed25519 signatures, codes, Gumroad, expiry, tickets, permissions)
• Commercial license for your own and client servers (no resale of the kit)
REQUIREMENTS
Free Cloudflare account, Node.js 22+, a Discord server where you have Manage Server. About 15 minutes to set up.
Need Stripe/PayPal webhooks → roles or Telegram + Discord sync? https://gosuoo.com/custom
Instant download (ZIP).