MAZAL.EXE / RELEASE 1.1.2 / 19 NOVEMBER 2026

Two settings. One password.

Keep @mazalexebot and your existing mazal-exe Pages project. Confirm the database and Telegram token, upload the update, then unlock with the password you already chose.

Everything here uses your browser and Telegram. No GitHub, terminal, Node installation, or always-on laptop.

What goes where

Extract MAZAL-EXE-ALL-IN-ONE-v1.1.2.zip once. This is your complete download bundle. It contains the separately packaged deployment.

Inside the bundleWhere to use it
00_START_HERE.html
00_START_HERE.txt
Open either on your device. This HTML guide also works offline.
01_UPLOAD_TO_CLOUDFLARE_PAGES.zipUpload this inner ZIP to Cloudflare Pages Direct Upload. It already contains the Worker, setup interface, quote bank and AI adapter.
02_AVATARS_AND_REACTIONS/Optional pictures for Telegram. Open the folder and send individual images as photos.
03_SOURCE_AND_VOICE.zipKeep for future updates. Contains source, tests, all 50 quotes and the private quote-source audit. Do not upload this archive to the public site.
04_RELEASE_NOTES.txt
05_TEST_REPORT.txt
Read the changes and what was verified.
Only one ZIP goes into Cloudflare: 01_UPLOAD_TO_CLOUDFLARE_PAGES.zip. The complete outer bundle is for you to keep.

There is no second AI application to upload. Its code is already inside the deployment ZIP; you activate it with bindings and settings later.

Only two required Cloudflare entries

Open Cloudflare → Workers & Pages → mazal-exe → Settings. Confirm these in Production before uploading:

WhereSettingUse
Bindings → D1 databaseDBSelect your existing mazal-exe-db.
Variables and SecretsTELEGRAM_BOT_TOKEN
type Secret / Encrypt
Keep the existing active token for @mazalexebot.

If both are already correct, leave them in place. Keep your bot's username, chat and profile picture.

Your setup password is already chosen. Enter it on the setup page after deployment. There is no extra Cloudflare password field to configure. The page source contains no chosen password; verification uses only the packaged server-side SHA-256 verifier.
PHASE 1 · AI CAN STAY OFF

Update your existing bot

1. Confirm the two settings above

In the existing mazal-exe Pages project, keep DB → mazal-exe-db and the existing TELEGRAM_BOT_TOKEN. Save any missing binding or token before creating the deployment.

Nothing needs to be pasted into the D1 SQL console. Select mazal-exe-db as the DB binding in the Pages project's Production settings. Initialize DB will create the bot's namespaced tables automatically.

2. Upload the inner ZIP to Production

Choose Create a new deployment → Production. Upload 01_UPLOAD_TO_CLOUDFLARE_PAGES.zip unchanged, then Save and Deploy. This new deployment picks up your saved settings.

Seeing “Pages _routes.json is not supported”? Return to the existing mazal-exe Pages project. The generic Worker static-file uploader is a different flow. Keep _worker.js and _routes.json at the root of the inner ZIP.

Open mazal-exe.pages.dev/health. Look for:

{
  "service": "mazal.exe",
  "version": "1.1.2",
  "runtime": "Cloudflare Worker",
  "hosting": "Cloudflare Pages"
}

If /health still says v1.1.0, the old build is live. Complete the new v1.1.2 Production upload before using the simplified password setup. Changing settings alone does not install the update.

The guide is at mazal-exe.pages.dev/guide. A static “backend is not executing here” page means the upload target needs correcting.

3. Unlock and initialize

  1. Open mazal-exe.pages.dev/setup. Enter your chosen password and click Unlock / Check. Clear password clears the entered value from the page.
  2. Confirm the token identifies @mazalexebot. Click Initialize DB. It is safe to run again and preserves your existing Mazal v1 data.
  3. Click Unlock / Check again. If your owner account is already linked, skip pairing.
  4. Only if no owner is linked: if an older webhook is active, expand Moving the same bot from an older webhook? and click Disconnect old webhook for pairing first. Then click Create pairing code, send the exact /pair CODE to @mazalexebot from your own private chat, and click Complete pairing. If you already sent the command before disconnecting, resend it afterwards while valid, or create a new code if expired.

4. Register webhook — required once for v1.1.2

Click Register webhook even when you are already paired. This update derives Telegram delivery verification automatically from the bot token. Telegram needs the new registration even if the URL already looks right.

Then click Unlock / Check. The webhook should be https://mazal-exe.pages.dev/telegram.

5. Try it in Telegram

Open @mazalexebot and send /start, then fortune, meme lottery, or give me a riddle. /start and these built-in requests need no AI setup. Owner /test checks the approval-and-delivery path; /invite creates a one-use invitation for a friend.

PHASE 2 · SAME ZIP

Where your OpenAI key goes

Open your existing mazal-exe gateway

Your gateway is already created. In AI → AI Gateway → mazal-exe, select Provider Keys. The overview's code examples have no key input; the provider-key form is inside this gateway.

Gateway ID / AI_GATEWAY_ID: mazal-exe
OpenAI provider key alias: default
These are different settings. Keep your existing gateway.

The Cloudflare API token shown in the curl example is not needed by this bot's AI binding. There is no curl or terminal step.

If your credits are in your OpenAI API organization, use a project API key from that organization. In Cloudflare:

AI → AI Gateway → mazal-exe → Provider Keys → Add API Key
Provider: OpenAI
API key: your OpenAI project key
Alias: default
Click Save.

Then open that gateway's Settings and turn Require provider credentials ON. Keep gateway authentication enabled. This uses your OpenAI organization's billing/eligible credits and prevents fallback to Cloudflare-managed provider credentials. Reuse a correctly stored key if it is already there.

If you purchased Cloudflare AI Gateway credits instead: use the funded gateway with Unified Billing; this route needs no OpenAI key. A stored OpenAI key under alias default takes precedence over Cloudflare credits.

Connect the gateway to the Pages project

  1. In mazal-exe → Settings → Bindings → Production, add or reuse a Workers AI binding named AI.
  2. Under Variables and Secrets → Production, use these plain-text variables:
    AI_GATEWAY_ID = mazal-exe
    AI_MODEL = openai/gpt-5.6-luna
    Use your existing gateway ID mazal-exe; default is the provider-key alias.
  3. After saving any settings changes, create a new Production deployment using the same inner ZIP.
  4. At /setup, enter your chosen password and click Unlock / Check → Test AI → Enable AI. Test AI makes one metered call.

The agreed model stays openai/gpt-5.6-luna. The Worker handles permissions, cards, quotes and delivery. AI interprets language and drafts replies; personal AI replies to friends wait for your approval and keep the AI disclosure.

Eligible ChatGPT API-credit benefits must be activated for the relevant OpenAI organization. Check its balance and model access. API usage does not inherit this ChatGPT conversation or its private history. No Cloudflare API token is required by this bot; the AI binding authenticates within your Cloudflare account.

AI starts off for a new database. Defaults are 20 AI requests per person and 100 total per UTC day, with at most 900 output tokens per call and no automatic model upgrade. Deterministic features use no model calls. These limits reduce usage; they do not guarantee a zero bill.

Install the pictures where you want them

Your existing bot profile picture can stay. The 02_AVATARS_AND_REACTIONS folder includes the profile, dealer, surprised, Kappa, MLG, Bateman and hardbass images, plus the frog prize and an interface concept board.

ImageAction
MAZAL-EXE-Profile.pngOptional: BotFather → select existing @mazalexebot → edit profile picture.
MAZAL-EXE-Dealer.pngIn your own bot chat, send /avatar, then send this image as a photo.
MAZAL-Frog-Prize.png or a reaction imageSend /memeadd, then one image as a photo. Repeat for other lottery prizes.

Choose Telegram's photo/image option. Uploading the PNG as a document does not install it in the bot. The PNGs are reaction images; this bundle does not automatically publish a Telegram sticker set.

If something stops you

What you seeWhat to do
_routes.json is not supported, or a static fallback appearsUse the existing mazal-exe Pages project and upload the complete inner deployment ZIP as Production.
Old URL or older versionOpen https://mazal-exe.pages.dev and check /health for version 1.1.2. Wait for the new Production deployment to finish.
Password is rejectedEnter the password you already chose, unchanged. Confirm you are on the v1.1.2 deployment. A deliberately configured MAZAL_PASSWORD override replaces the packaged password; see DEPLOY.txt.
DB or Telegram token is missingConfirm DB → mazal-exe-db and the active TELEGRAM_BOT_TOKEN in Production, then deploy the inner ZIP again.
Bot stops replying after this updateUnlock the setup page and click Register webhook once. v1.1.2 automatically derives a new verification value for Telegram deliveries.
Owner already linkedKeep the existing owner, skip pairing and click Register webhook.
Pairing is not foundIf an old webhook is active, click Disconnect old webhook for pairing before sending or resending the unexpired command to the same bot from your own private chat. Then Complete pairing. Keep pending messages.
No gateway exists in the accountOnly in that case: AI → AI Gateway → Create Gateway → name mazal-exe → Create, then open it. Your current mazal-exe gateway already exists, so skip creation.
AI test failsKeep AI off. Check AI, the gateway name, model access and the chosen key/credit balance. Games and quotes remain usable.

/pause suspends new games/AI and queued approved replies. /resume restores service. Your approval controls remain separate from guest messages and model output.

What this release includes

Fifty direct Alexey quotes (30 English, 20 Russian), random draws without repeats until each cycle finishes, blackjack, meme lottery, bilingual riddles, owner-set status, map-search links, natural-language routing, short approved-chat context and Telegram approvals. The selected voice examples are included in the model prompt; no fine-tuning has been run.

Written messages are implemented. Voice-note transcription, spoken replies, Gmail and personal WhatsApp connections are future integrations. The test report distinguishes local verification from the live checks you complete in your own account.

Official setup references