Add pricing page and update navigation links

Replaced `.single()` with `.maybeSingle()` in multiple command files to handle cases where no record is found, and added a new /pricing route and navigation links to the UI.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: aed2e46d-25bb-4b73-81a1-bb9e8437c261
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: e91d020a-35a6-4add-9945-887dd3ecae9f
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/aed2e46d-25bb-4b73-81a1-bb9e8437c261/tdDjujk
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sirpiglr 2025-12-10 02:36:59 +00:00
parent 5c23e96a83
commit 8c2dee5d9e
20 changed files with 733 additions and 33 deletions

View file

@ -21,6 +21,10 @@ externalPort = 80
localPort = 8080
externalPort = 8080
[[ports]]
localPort = 34785
externalPort = 3000
[workflows]
runButton = "Project"

View file

@ -57,7 +57,7 @@ module.exports = {
.from('discord_links')
.select('user_id')
.eq('discord_id', target.id)
.single();
.maybeSingle();
if (!link) {
return interaction.editReply({
@ -73,7 +73,7 @@ module.exports = {
.from('user_profiles')
.select('username, avatar_url, badges, xp, daily_streak')
.eq('id', link.user_id)
.single();
.maybeSingle();
let earnedBadges = [];

View file

@ -78,7 +78,7 @@ async function handleFederatedDaily(interaction, supabase, client) {
.from('discord_links')
.select('user_id')
.eq('discord_id', interaction.user.id)
.single();
.maybeSingle();
if (!link) {
return interaction.editReply({
@ -94,7 +94,7 @@ async function handleFederatedDaily(interaction, supabase, client) {
.from('user_profiles')
.select('xp, daily_streak, last_daily, prestige_level, total_xp_earned')
.eq('id', link.user_id)
.single();
.maybeSingle();
const now = new Date();
const lastDaily = profile?.last_daily ? new Date(profile.last_daily) : null;

View file

@ -22,14 +22,14 @@ module.exports = {
.from('discord_links')
.select('user_id')
.eq('discord_id', target.id)
.single();
.maybeSingle();
if (link) {
const { data: contribution } = await supabase
.from('foundation_contributions')
.select('total_donated, volunteer_hours, badges')
.eq('user_id', link.user_id)
.single();
.maybeSingle();
contributionData = contribution;
}

View file

@ -319,7 +319,7 @@ async function handleFederatedLeaderboard(interaction, supabase, category) {
.from("user_profiles")
.select("username, full_name, avatar_url")
.eq("id", userId)
.single();
.maybeSingle();
if (profile) {
leaderboardData.push({
@ -355,7 +355,7 @@ async function handleFederatedLeaderboard(interaction, supabase, category) {
.from("user_profiles")
.select("username, full_name, avatar_url")
.eq("id", userId)
.single();
.maybeSingle();
if (profile) {
leaderboardData.push({
@ -381,7 +381,7 @@ async function handleFederatedLeaderboard(interaction, supabase, category) {
.from("user_profiles")
.select("username, full_name, avatar_url")
.eq("id", creator.user_id)
.single();
.maybeSingle();
if (profile) {
const badges = [];

View file

@ -49,7 +49,7 @@ module.exports = {
.from("discord_links")
.select("user_id, primary_arm")
.eq("discord_id", interaction.user.id)
.single();
.maybeSingle();
if (!link) {
const embed = new EmbedBuilder()
@ -66,7 +66,7 @@ module.exports = {
.from("user_profiles")
.select("username, full_name, avatar_url")
.eq("id", link.user_id)
.single();
.maybeSingle();
const content = interaction.options.getString("content");
const category = interaction.options.getString("category") || "general";
@ -100,7 +100,7 @@ module.exports = {
discord_author_avatar: interaction.user.displayAvatarURL(),
})
.select()
.single();
.maybeSingle();
if (error) throw error;

View file

@ -98,7 +98,7 @@ async function viewPrestige(interaction, supabase, mode) {
.from('discord_links')
.select('user_id')
.eq('discord_id', target.id)
.single();
.maybeSingle();
if (!link) {
return interaction.editReply({
@ -114,7 +114,7 @@ async function viewPrestige(interaction, supabase, mode) {
.from('user_profiles')
.select('username, xp, prestige_level, total_xp_earned')
.eq('id', link.user_id)
.single();
.maybeSingle();
const prestige = profile?.prestige_level || 0;
const totalXpEarned = profile?.total_xp_earned || profile?.xp || 0;
@ -295,7 +295,7 @@ async function prestigeUp(interaction, supabase, client, mode) {
.from('user_profiles')
.select('username, xp, prestige_level, total_xp_earned')
.eq('id', link.user_id)
.single();
.maybeSingle();
const currentXp = profile?.xp || 0;
const level = Math.floor(Math.sqrt(currentXp / 100));

View file

@ -107,7 +107,7 @@ async function handleFederatedProfile(interaction, supabase, targetUser) {
.from("discord_links")
.select("user_id, primary_arm")
.eq("discord_id", targetUser.id)
.single();
.maybeSingle();
if (!link) {
const embed = new EmbedBuilder()
@ -127,7 +127,7 @@ async function handleFederatedProfile(interaction, supabase, targetUser) {
.from("user_profiles")
.select("*")
.eq("id", link.user_id)
.single();
.maybeSingle();
if (!profile) {
const embed = new EmbedBuilder()

View file

@ -91,7 +91,7 @@ async function handleFederatedRank(interaction, supabase, target) {
.from('discord_links')
.select('user_id, primary_arm')
.eq('discord_id', target.id)
.single();
.maybeSingle();
if (!link) {
return interaction.editReply({
@ -107,7 +107,7 @@ async function handleFederatedRank(interaction, supabase, target) {
.from('user_profiles')
.select('username, avatar_url, xp, bio, prestige_level, total_xp_earned')
.eq('id', link.user_id)
.single();
.maybeSingle();
const xp = profile?.xp || 0;
const prestige = profile?.prestige_level || 0;

View file

@ -54,7 +54,7 @@ module.exports = {
.from("discord_links")
.select("user_id, primary_arm")
.eq("discord_id", interaction.user.id)
.single();
.maybeSingle();
if (!link) {
const embed = new EmbedBuilder()

View file

@ -16,7 +16,7 @@ module.exports = {
.from("discord_links")
.select("user_id, primary_arm, linked_at")
.eq("discord_id", interaction.user.id)
.single();
.maybeSingle();
if (linkError) {
console.error("Stats link query error:", linkError);
@ -37,7 +37,7 @@ module.exports = {
.from("user_profiles")
.select("*")
.eq("id", link.user_id)
.single();
.maybeSingle();
const { count: postCount } = await supabase
.from("community_posts")
@ -58,7 +58,7 @@ module.exports = {
.from("aethex_creators")
.select("verified, featured, total_projects")
.eq("user_id", link.user_id)
.single();
.maybeSingle();
const armEmojis = {
labs: "🧪",

View file

@ -23,7 +23,7 @@ module.exports = {
.from('discord_links')
.select('user_id')
.eq('discord_id', target.id)
.single();
.maybeSingle();
if (!link) {
return interaction.editReply({
@ -39,7 +39,7 @@ module.exports = {
.from('user_profiles')
.select('username, avatar_url, bio')
.eq('id', link.user_id)
.single();
.maybeSingle();
const { data: projects, count: projectCount } = await supabase
.from('studio_projects')

View file

@ -16,7 +16,7 @@ module.exports = {
.from("discord_links")
.select("*")
.eq("discord_id", interaction.user.id)
.single();
.maybeSingle();
if (!link) {
const embed = new EmbedBuilder()

View file

@ -51,14 +51,14 @@ module.exports = {
.from('discord_links')
.select('user_id, primary_arm, linked_at')
.eq('discord_id', target.id)
.single();
.maybeSingle();
if (link) {
const { data: profile } = await supabase
.from('user_profiles')
.select('username, xp')
.eq('id', link.user_id)
.single();
.maybeSingle();
embed.addFields(
{ name: 'AeThex Linked', value: 'Yes', inline: true },

View file

@ -16,7 +16,7 @@ module.exports = {
.from("discord_links")
.select("user_id, primary_arm")
.eq("discord_id", interaction.user.id)
.single();
.maybeSingle();
if (!link) {
const embed = new EmbedBuilder()
@ -33,7 +33,7 @@ module.exports = {
.from("user_profiles")
.select("user_type")
.eq("id", link.user_id)
.single();
.maybeSingle();
const { data: mappings } = await supabase
.from("discord_role_mappings")

View file

@ -23,7 +23,7 @@ module.exports = {
.from("discord_links")
.select("*")
.eq("discord_id", interaction.user.id)
.single();
.maybeSingle();
if (existingLink) {
const embed = new EmbedBuilder()

View file

@ -429,7 +429,7 @@
<a href="/features">Features</a>
<a href="/commands">Commands</a>
<a href="/federation" class="active">Federation</a>
<a href="/dashboard">Dashboard</a>
<a href="/pricing">Pricing</a>
</nav>
<a href="https://discord.com/api/oauth2/authorize?client_id=578971245454950421&permissions=8&scope=bot%20applications.commands" class="btn btn-primary" target="_blank">Add to Server</a>

View file

@ -471,7 +471,8 @@
<a href="/">Home</a>
<a href="/features">Features</a>
<a href="/commands">Commands</a>
<a href="https://discord.gg/athx" target="_blank">Discord</a>
<a href="/federation">Federation</a>
<a href="/pricing">Pricing</a>
</nav>
<div class="header-buttons">

View file

@ -0,0 +1,660 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pricing - AeThex | Warden</title>
<style>
:root {
--background: #030712;
--foreground: #f8fafc;
--card: rgba(15, 23, 42, 0.6);
--card-border: rgba(99, 102, 241, 0.15);
--card-border-hover: rgba(99, 102, 241, 0.4);
--primary: #6366f1;
--primary-light: #818cf8;
--secondary: rgba(30, 41, 59, 0.5);
--muted: #64748b;
--border: rgba(51, 65, 85, 0.5);
--success: #10b981;
--warning: #f59e0b;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Courier New', Courier, monospace;
background: var(--background);
color: var(--foreground);
min-height: 100vh;
line-height: 1.6;
}
.bg-grid {
position: fixed;
inset: 0;
background-image:
linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
background-size: 64px 64px;
pointer-events: none;
z-index: -2;
}
.bg-glow {
position: fixed;
top: -50%;
left: 50%;
transform: translateX(-50%);
width: 150%;
height: 100%;
background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
pointer-events: none;
z-index: -1;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1.5rem;
}
header {
position: sticky;
top: 0;
z-index: 100;
background: rgba(3, 7, 18, 0.8);
backdrop-filter: blur(20px);
border-bottom: 1px solid var(--border);
}
.header-content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 0;
}
.logo {
display: flex;
align-items: center;
gap: 0.75rem;
text-decoration: none;
color: var(--foreground);
}
.logo-icon { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; }
.logo-text { font-size: 1.25rem; font-weight: 700; }
.nav-links {
display: flex;
gap: 2rem;
align-items: center;
}
.nav-links a {
color: var(--muted);
text-decoration: none;
font-weight: 500;
transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--foreground); }
.btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-weight: 600;
text-decoration: none;
transition: all 0.2s;
border: none;
cursor: pointer;
font-size: 0.9rem;
font-family: inherit;
}
.btn-primary {
background: linear-gradient(135deg, var(--primary), #3b82f6);
color: white;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4); }
.btn-secondary {
background: var(--secondary);
border: 1px solid var(--border);
color: var(--foreground);
}
.hero {
padding: 4rem 0 2rem;
text-align: center;
}
.hero h1 {
font-size: 3rem;
font-weight: 800;
margin-bottom: 1rem;
}
.text-gradient {
background: linear-gradient(135deg, var(--primary), #3b82f6, #06b6d4);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.hero p {
color: var(--muted);
font-size: 1.2rem;
max-width: 600px;
margin: 0 auto;
}
.free-badge {
display: inline-flex;
align-items: center;
gap: 0.5rem;
background: rgba(16, 185, 129, 0.1);
border: 1px solid rgba(16, 185, 129, 0.3);
color: var(--success);
padding: 0.5rem 1rem;
border-radius: 100px;
font-size: 0.9rem;
font-weight: 600;
margin-top: 1.5rem;
}
.pricing-section {
padding: 3rem 0;
}
.pricing-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 2rem;
max-width: 1100px;
margin: 0 auto;
}
@media (max-width: 900px) {
.pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
.hero h1 { font-size: 2rem; }
.nav-links { display: none; }
}
.pricing-card {
background: var(--card);
border: 1px solid var(--card-border);
border-radius: 16px;
padding: 2rem;
display: flex;
flex-direction: column;
transition: all 0.3s;
}
.pricing-card:hover {
border-color: var(--card-border-hover);
transform: translateY(-4px);
}
.pricing-card.featured {
border-color: var(--primary);
position: relative;
box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
}
.pricing-card.featured::before {
content: 'MOST POPULAR';
position: absolute;
top: -12px;
left: 50%;
transform: translateX(-50%);
background: linear-gradient(135deg, var(--primary), #3b82f6);
color: white;
padding: 0.25rem 1rem;
border-radius: 100px;
font-size: 0.7rem;
font-weight: 700;
letter-spacing: 0.5px;
}
.pricing-card h3 {
font-size: 1.5rem;
font-weight: 700;
text-align: center;
margin-bottom: 0.5rem;
}
.pricing-price {
text-align: center;
margin-bottom: 1rem;
}
.pricing-price .amount {
font-size: 3rem;
font-weight: 800;
background: linear-gradient(135deg, var(--foreground), var(--muted));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.pricing-price .period {
color: var(--muted);
font-size: 0.9rem;
}
.pricing-description {
text-align: center;
color: var(--muted);
font-size: 0.9rem;
margin-bottom: 1.5rem;
min-height: 40px;
}
.pricing-features {
list-style: none;
margin-bottom: 2rem;
flex-grow: 1;
}
.pricing-features li {
display: flex;
align-items: flex-start;
gap: 0.75rem;
margin-bottom: 0.75rem;
font-size: 0.9rem;
}
.pricing-features li .check {
color: var(--success);
font-weight: bold;
flex-shrink: 0;
}
.pricing-features li.disabled {
color: var(--muted);
text-decoration: line-through;
opacity: 0.6;
}
.pricing-features li.disabled .check {
color: var(--muted);
}
.pricing-cta {
width: 100%;
padding: 0.875rem;
text-align: center;
}
.comparison-section {
padding: 4rem 0;
border-top: 1px solid var(--border);
}
.comparison-section h2 {
text-align: center;
font-size: 2rem;
margin-bottom: 2rem;
}
.comparison-table {
width: 100%;
border-collapse: collapse;
background: var(--card);
border-radius: 16px;
overflow: hidden;
}
.comparison-table th, .comparison-table td {
padding: 1rem 1.5rem;
text-align: left;
border-bottom: 1px solid var(--border);
}
.comparison-table th {
background: rgba(99, 102, 241, 0.1);
font-weight: 600;
}
.comparison-table td:not(:first-child) {
text-align: center;
}
.comparison-table tr:last-child td {
border-bottom: none;
}
.check-icon { color: var(--success); }
.cross-icon { color: var(--muted); opacity: 0.5; }
.faq-section {
padding: 4rem 0;
border-top: 1px solid var(--border);
}
.faq-section h2 {
text-align: center;
font-size: 2rem;
margin-bottom: 2rem;
}
.faq-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
max-width: 900px;
margin: 0 auto;
}
@media (max-width: 768px) {
.faq-grid { grid-template-columns: 1fr; }
}
.faq-item {
background: var(--card);
border: 1px solid var(--card-border);
border-radius: 12px;
padding: 1.5rem;
}
.faq-item h4 {
font-size: 1rem;
margin-bottom: 0.5rem;
}
.faq-item p {
color: var(--muted);
font-size: 0.9rem;
}
.cta-section {
padding: 4rem 0;
}
.cta-box {
background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.05));
border: 1px solid rgba(99, 102, 241, 0.2);
border-radius: 24px;
padding: 3rem 2rem;
text-align: center;
}
.cta-box h2 {
font-size: 1.75rem;
margin-bottom: 1rem;
}
.cta-box p {
color: var(--muted);
margin-bottom: 1.5rem;
}
footer {
border-top: 1px solid var(--border);
padding: 2rem 0;
}
.footer-content {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
.footer-links {
display: flex;
gap: 2rem;
}
.footer-links a {
color: var(--muted);
text-decoration: none;
font-size: 0.9rem;
}
.footer-links a:hover { color: var(--foreground); }
.footer-copy { color: var(--muted); font-size: 0.85rem; }
</style>
</head>
<body>
<div class="bg-grid"></div>
<div class="bg-glow"></div>
<header>
<div class="container header-content">
<a href="/" class="logo">
<img src="/logo.png" alt="AeThex" class="logo-icon">
<span class="logo-text">AeThex | Warden</span>
</a>
<nav class="nav-links">
<a href="/">Home</a>
<a href="/features">Features</a>
<a href="/commands">Commands</a>
<a href="/federation">Federation</a>
<a href="/pricing" class="active">Pricing</a>
</nav>
<a href="https://discord.com/api/oauth2/authorize?client_id=578971245454950421&permissions=8&scope=bot%20applications.commands" class="btn btn-primary" target="_blank">Add to Server</a>
</div>
</header>
<main>
<section class="hero">
<div class="container">
<h1>Simple, <span class="text-gradient">Transparent</span> Pricing</h1>
<p>Warden is free forever for all core features. Premium options available for servers that need extra protection or visibility.</p>
<div class="free-badge">
<span>&#10003;</span>
Free Forever - No credit card required
</div>
</div>
</section>
<section class="pricing-section">
<div class="container">
<div class="pricing-grid">
<div class="pricing-card">
<h3>Free</h3>
<div class="pricing-price">
<span class="amount">$0</span>
<span class="period">forever</span>
</div>
<p class="pricing-description">Everything you need for a great community</p>
<ul class="pricing-features">
<li><span class="check">&#10003;</span> Unified XP & Leveling system</li>
<li><span class="check">&#10003;</span> Prestige system (up to P10)</li>
<li><span class="check">&#10003;</span> Achievements & Quests</li>
<li><span class="check">&#10003;</span> Shop & Economy features</li>
<li><span class="check">&#10003;</span> Welcome/Goodbye messages</li>
<li><span class="check">&#10003;</span> Role panels & Giveaways</li>
<li><span class="check">&#10003;</span> Sentinel anti-nuke protection</li>
<li><span class="check">&#10003;</span> Auto-moderation tools</li>
<li><span class="check">&#10003;</span> Federation: Critical threat auto-bans</li>
<li><span class="check">&#10003;</span> Server directory listing</li>
<li><span class="check">&#10003;</span> Cross-server reputation</li>
</ul>
<a href="https://discord.com/api/oauth2/authorize?client_id=578971245454950421&permissions=8&scope=bot%20applications.commands" class="btn btn-secondary pricing-cta" target="_blank">Add Warden Free</a>
</div>
<div class="pricing-card featured">
<h3>Premium</h3>
<div class="pricing-price">
<span class="amount">$50</span>
<span class="period">per month</span>
</div>
<p class="pricing-description">Maximum protection for serious communities</p>
<ul class="pricing-features">
<li><span class="check">&#10003;</span> Everything in Free, plus:</li>
<li><span class="check">&#10003;</span> <strong>All-severity</strong> threat protection</li>
<li><span class="check">&#10003;</span> Auto-kick for Low/Medium threats</li>
<li><span class="check">&#10003;</span> Priority federation alerts</li>
<li><span class="check">&#10003;</span> Extended ban history access</li>
<li><span class="check">&#10003;</span> Premium server badge</li>
<li><span class="check">&#10003;</span> Priority support</li>
<li><span class="check">&#10003;</span> Custom alert channels</li>
<li><span class="check">&#10003;</span> Advanced threat analytics</li>
</ul>
<a href="/federation" class="btn btn-primary pricing-cta">Upgrade to Premium</a>
</div>
<div class="pricing-card">
<h3>Featured Slot</h3>
<div class="pricing-price">
<span class="amount">$200</span>
<span class="period">per week</span>
</div>
<p class="pricing-description">Maximum visibility across the federation</p>
<ul class="pricing-features">
<li><span class="check">&#10003;</span> Featured in all member servers</li>
<li><span class="check">&#10003;</span> Cross-server promotion</li>
<li><span class="check">&#10003;</span> Boosted directory ranking</li>
<li><span class="check">&#10003;</span> Featured badge on server card</li>
<li><span class="check">&#10003;</span> Recruitment announcements</li>
<li><span class="check">&#10003;</span> Analytics dashboard</li>
<li><span class="check">&#10003;</span> Custom invite tracking</li>
<li><span class="check">&#10003;</span> Priority listing renewal</li>
</ul>
<a href="/federation" class="btn btn-secondary pricing-cta">Get Featured</a>
</div>
</div>
</div>
</section>
<section class="comparison-section">
<div class="container">
<h2>Feature Comparison</h2>
<table class="comparison-table">
<thead>
<tr>
<th>Feature</th>
<th>Free</th>
<th>Premium</th>
</tr>
</thead>
<tbody>
<tr>
<td>XP & Leveling System</td>
<td><span class="check-icon">&#10003;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
<tr>
<td>Prestige System</td>
<td><span class="check-icon">&#10003;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
<tr>
<td>Achievements & Quests</td>
<td><span class="check-icon">&#10003;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
<tr>
<td>Economy & Shop</td>
<td><span class="check-icon">&#10003;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
<tr>
<td>Sentinel Anti-Nuke</td>
<td><span class="check-icon">&#10003;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
<tr>
<td>Auto-Moderation</td>
<td><span class="check-icon">&#10003;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
<tr>
<td>Critical Threat Protection</td>
<td><span class="check-icon">&#10003;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
<tr>
<td>Low/Medium Threat Protection</td>
<td><span class="cross-icon">&#10007;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
<tr>
<td>Priority Alerts</td>
<td><span class="cross-icon">&#10007;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
<tr>
<td>Premium Badge</td>
<td><span class="cross-icon">&#10007;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
<tr>
<td>Priority Support</td>
<td><span class="cross-icon">&#10007;</span></td>
<td><span class="check-icon">&#10003;</span></td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="faq-section">
<div class="container">
<h2>Frequently Asked Questions</h2>
<div class="faq-grid">
<div class="faq-item">
<h4>Is Warden really free forever?</h4>
<p>Yes! All core features including XP, leveling, moderation, and critical threat protection are completely free with no time limits or hidden costs.</p>
</div>
<div class="faq-item">
<h4>What's the difference in protection levels?</h4>
<p>Free tier auto-bans critical threats (the most dangerous). Premium adds auto-kick for low/medium severity threats for paranoid admins who want extra security.</p>
</div>
<div class="faq-item">
<h4>Can I cancel Premium anytime?</h4>
<p>Absolutely. Cancel anytime and you'll retain Premium until the end of your billing period. You'll then revert to Free tier automatically.</p>
</div>
<div class="faq-item">
<h4>What is a Featured Slot?</h4>
<p>Featured Slots promote your server across all federation member servers. Great for growing communities looking to attract new members.</p>
</div>
<div class="faq-item">
<h4>Do I need Premium to use the Federation?</h4>
<p>No! Federation membership is free. Premium just adds extra protection layers. All servers can join and benefit from the shared ban list.</p>
</div>
<div class="faq-item">
<h4>How do payments work?</h4>
<p>We use Stripe for secure payments. Premium is billed monthly, Featured Slots are billed weekly. All major credit cards accepted.</p>
</div>
</div>
</div>
</section>
<section class="cta-section">
<div class="container">
<div class="cta-box">
<h2>Ready to Get Started?</h2>
<p>Add Warden to your server now. Free forever, upgrade when you need it.</p>
<a href="https://discord.com/api/oauth2/authorize?client_id=578971245454950421&permissions=8&scope=bot%20applications.commands" class="btn btn-primary" target="_blank">Add Warden Free</a>
</div>
</div>
</section>
</main>
<footer>
<div class="container footer-content">
<div class="footer-copy">AeThex | Warden</div>
<div class="footer-links">
<a href="/features">Features</a>
<a href="/commands">Commands</a>
<a href="/federation">Federation</a>
<a href="https://discord.gg/athx" target="_blank">Discord</a>
</div>
<div class="footer-copy">&copy; 2025 AeThex. All rights reserved.</div>
</div>
</footer>
</body>
</html>

View file

@ -1434,10 +1434,45 @@ function createWebServer(discordClient, supabase, options = {}) {
});
});
app.get('/api/bot-stats', async (req, res) => {
try {
const guilds = discordClient.guilds?.cache?.size || 0;
let users = 0;
if (discordClient.guilds?.cache) {
discordClient.guilds.cache.forEach(guild => {
users += guild.memberCount || 0;
});
}
let linkedProfiles = 0;
if (supabase) {
const { count } = await supabase
.from('discord_links')
.select('*', { count: 'exact', head: true });
linkedProfiles = count || 0;
}
res.json({
guilds,
users,
linkedProfiles,
commands: 66,
uptime: process.uptime()
});
} catch (error) {
res.json({ guilds: 0, users: 0, linkedProfiles: 0, commands: 66 });
}
});
app.get('/federation', (req, res) => {
res.sendFile(path.join(__dirname, '../public/federation.html'));
});
app.get('/pricing', (req, res) => {
res.sendFile(path.join(__dirname, '../public/pricing.html'));
});
app.get('/dashboard', (req, res) => {
res.sendFile(path.join(__dirname, '../public/dashboard.html'));
});