queennoxi / SETUP_GUIDE.md
Alexainc
Initial QueenNoxi Build (Fresh Rebrand)
2362a2a
|
Raw
History Blame Contribute Delete
5.03 kB

πŸ€– QueenNoxi β€” Complete Setup Guide

Get every API key and config value needed to run the bot.


1. Telegram API Credentials (API_ID & API_HASH)

  1. Go to my.telegram.org
  2. Log in with your phone number
  3. Click "API development tools"
  4. Create an app (any name/platform is fine)
  5. Copy App api_id β†’ API_ID
  6. Copy App api_hash β†’ API_HASH

2. Bot Token (TOKEN)

  1. Open Telegram β†’ message @BotFather
  2. Send /newbot
  3. Choose a name (display name, e.g. Queen Noxi)
  4. Choose a username (must end in bot, e.g. QueenNoxiGroupBot)
  5. BotFather replies with your token:
    123456789:AABBccDDeeFFggHHiiJJ...
    
    β†’ TOKEN
  6. Also set BOT_NAME = the display name you chose
  7. Also set BOT_USERNAME = the username without @

Tip: Also send /setprivacy β†’ Disable to let the bot read all group messages.


3. Your Owner ID (OWNER_IDS)

Message @userinfobot on Telegram. It replies with your numeric user ID, e.g. 123456789.

To add multiple owners, separate with spaces:

OWNER_IDS=123456789 987654321

4. MongoDB (MONGO_DB_URI)

You already have MongoDB Atlas β€” reuse the same cluster or create a new database in it.

To add a new database in your existing Atlas cluster:

  1. Go to cloud.mongodb.com
  2. Open your cluster β†’ Browse Collections β†’ Add My Own Data
  3. Create a database named QueenNoxi
  4. Your existing connection URI works β€” just change the DB name at the end:
    mongodb+srv://user:pass@cluster.xxxxx.mongodb.net/QueenNoxi?retryWrites=true&w=majority
    
    β†’ MONGO_DB_URI

5. PostgreSQL Database (DATABASE_URL)

πŸ†“ Recommended: Neon.tech

(Free forever β€” serverless, no credit card, never sleeps)

  1. Sign up at neon.tech (GitHub login works)
  2. Click "New Project" β†’ choose a region closest to you
  3. Wait ~10 seconds for provisioning
  4. Go to Dashboard β†’ Connection Details
  5. Select "Pooled connection" and copy the string:
    postgresql://user:pass@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require
    
    β†’ DATABASE_URL
Alternative Free Tier Notes
Supabase 500 MB Pauses after 1 week inactive
Railway $5 credit/mo Easiest UI
Aiven 1 free service Good uptime

6. Support Chat (SUPPORT_CHAT)

You can provide either a public username or a full invite link.

  • Public Group: Set SUPPORT_CHAT=yourgroupusername (without @)
  • Private Group: Set SUPPORT_CHAT=https://t.me/+xyz123... (full invite link)

The bot will automatically handle either format for the support buttons in the menu.


7. Start Image (START_IMG)

Any direct image URL (must end in .jpg, .png, .webp).

Quick options:

  • Upload to imgbb.com β†’ get direct link
  • Use any public Telegram CDN URL
  • Use a raw GitHub image URL

8. Log Channel (EVENT_LOGS)

  1. Create a private Telegram channel
  2. Add your bot as admin
  3. Forward any message from the channel to @getidsbot
  4. Copy the channel ID (looks like -100xxxxxxxxxx) β†’ EVENT_LOGS

9. Optional API Keys

Variable Service Cost Link
CASH_API_KEY Currency conversion Free api.freecurrencyapi.com
TIME_API_KEY Timezone lookup Free timezonedb.com

10. Deploying on HuggingFace Spaces

  1. Push this repo to Hugging Face
    • Space SDK: Docker
    • Visibility: Public or Private
  2. After creating, go to Settings β†’ Variables and secrets
  3. Add each key below as a Secret (sensitive) or Variable:
Type Variables
πŸ” Secret API_ID, API_HASH, TOKEN, MONGO_DB_URI, DATABASE_URL, OWNER_IDS
πŸ“ Variable BOT_NAME, BOT_USERNAME, SUPPORT_CHAT, START_IMG, EVENT_LOGS, WORKERS
  1. The Space auto-builds and starts β€” watch Logs for any errors.
  2. Your bot should come online within 2–3 minutes.

Health check: HuggingFace pings https://your-space.hf.space/health The bot responds with βœ… QueenNoxi is running!


11. Minimum Required .env for Local Testing

API_ID=12345678
API_HASH=your_api_hash_here
TOKEN=bot:token_here
OWNER_IDS=123456789
MONGO_DB_URI=mongodb+srv://user:pass@cluster.mongodb.net/QueenNoxi
BOT_NAME=QueenNoxi
BOT_USERNAME=yourbotusername

Run locally with:

# Load .env vars and start the bot
Get-Content .env | ForEach-Object { if ($_ -match '^([^#=]+)=(.*)$') { [System.Environment]::SetEnvironmentVariable($Matches[1].Trim(), $Matches[2].Trim()) } }
python app.py