๐Ÿค

Auto-Approve Bot

Automatically approve Telegram channel join requests & log members to Supabase

โš™๏ธ System Configuration Status

โœ… Bot Token Setโœ… Supabase URL Setโœ… Service Key Set

Perfect! All required environment variables are set. You can now register the webhook and launch the auto-approver.

โšก Register Webhook URL

๐Ÿ—„๏ธ Supabase Database Setup

Before running the bot, execute the following SQL script in your Supabase SQL Editor. This creates the new approved_users table to log member details:

create table public.approved_users (
    id bigint generated always as identity primary key,
    chat_id bigint unique not null,
    username text,
    first_name text,
    channel_id bigint not null,
    channel_name text,
    approved_at timestamp with time zone default timezone('utc'::text, now()) not null
);

-- Enable RLS
alter table public.approved_users enable row level security;

create policy "Allow all read for service role" on public.approved_users
    for select using (true);

create policy "Allow all insert for service role" on public.approved_users
    for insert with check (true);

๐Ÿ“– Telegram Setup Checklist

1
Create a new bot via @BotFather and obtain your bot token.
2
Create a Telegram channel and enable "Approve New Members" under the channel invite link settings.
3
Add your bot as an Administrator in the channel, giving it permissions to Invite Users via Link (which allows the bot to approve members).
4
Copy your production deployment URL, visit /api/setup (or click the register button above) to link your bot with Telegram.