A centralized premium management API built for the Mewwme Music Bot ecosystem, powered by Patreon integration.
Official Bot Website: https://meww.me
Mewwme Premium API was developed by Mewwme Development to handle premium subscriptions, Patreon OAuth integration, and automated guild premium management across multiple Mewwme bots.
This API acts as the core service responsible for:
- Managing Patreon subscription tiers
- Assigning premium status to Discord guilds
- Handling Patreon webhook events
- Synchronizing subscription changes automatically
- Logging events via Discord webhooks
It was specifically designed to support the internal infrastructure of the Mewwme Music Bot.
- 🔐 Patreon OAuth2 authentication
- 🏆 Premium tier management (Silver / Gold)
- 🏠 Guild premium activation & tracking
- 🔄 Automatic Patreon webhook handling
- 📡 Discord webhook logging
- 🗄️ Database integration via Prisma ORM
This project is no longer actively maintained.
Please note:
- The API was built exclusively for the Mewwme Music Bot infrastructure
- Self-hosting is not officially supported
- Issues and pull requests will not be reviewed
- Custom deployments are unsupported
The repository remains open-source under GPL-3.0 for transparency and archival purposes.
Licensed under the GNU General Public License v3.0 (GPL-3.0).
See the LICENSE file for full details.
Before running this project, ensure you have:
- Node.js v16 or higher
- npm
- PostgreSQL (or another supported database)
- Patreon Developer Application
- Discord Webhook URL (for logging)
git clone https://github.com/lrmn7/Mewwme-Patreon-Api.git
cd Mewwme-Patreon-Apinpm installCopy the example environment file:
cp .env.example .envUpdate the required variables:
PORT=4000
DB_PROVIDER=postgresql
DATABASE_URL=your-database-url
PATREON_CLIENT_ID=your-patreon-client-id
PATREON_CLIENT_SECRET=your-patreon-client-secret
PATREON_REDIRECT_URI=your-oauth-callback-url
PATREON_CAMPAIGN_ID=your-patreon-campaign-id
DISCORD_LOG_WEBHOOK=your-discord-webhook-url
.env file to version control.
npx prisma migrate devnpm run devOnce running:
- Use the authentication endpoints to connect Discord users to Patreon.
- Activate or deactivate premium guilds via the premium endpoints.
- Allow Patreon webhooks to automatically update subscription status.
- Monitor system logs through the configured Discord webhook.
-
GET /auth/patreon?discordId=<ID>Redirect user to Patreon OAuth -
GET /auth/patreon/callbackOAuth callback endpoint
POST /premium/serversActivate premium for a guild
{
"discordId": "user_id",
"guildId": "guild_id"
}DELETE /premium/serversDeactivate premium for a guild
{
"discordId": "user_id",
"guildId": "guild_id"
}-
GET /premium/show?discordId=<ID>Show user's premium status -
GET /premium/check?discordId=<ID>&guildId=<ID>Check if a guild has premium access
POST /webhooks/patreonPatreon webhook endpoint for subscription events
Automatically handles:
- New pledges
- Tier upgrades/downgrades
- Cancellations
- Expired subscriptions
| Tier | Premium Guild Slots |
|---|---|
| Silver | 2 guilds |
| Gold | 4 guilds |
- Never expose API secrets
- Store sensitive credentials in environment variables
- Keep dependencies updated
- Restrict webhook endpoints appropriately
- Use HTTPS in production
This API was created to:
- Centralize premium logic
- Reduce duplication across multiple bot instances
- Automate Patreon subscription management
- Maintain consistency across the Mewwme ecosystem