dbzexxo
v1.0.0
Published
Zexxo license gate: validates bot number + key against allowlist stored in GitLab repo (raw file).
Downloads
113
Maintainers
Readme
dbzexo
Paket NPM untuk license gate bot Zexxo.
Tujuan
Sebelum bot jalan, bot akan cek:
- Nomor bot ada di allowlist GitLab
- (Opsional) Key cocok (kalau allow.json punya
keys[])
Kalau tidak lolos, bot wajib exit.
Allowlist di GitLab
Buat repo private, misal zexxo/db, lalu file:
db/allow.json
{
"bots": ["6281234567890"],
"keys": [
{ "bot": "6281234567890", "key": "ZEXXO-KEY-ABC123", "active": true }
]
}ENV yang dibutuhkan
export GITLAB_PROJECT_ID="12345678"
export GITLAB_FILE_PATH="db/allow.json"
export GITLAB_REF="main"
export GITLAB_TOKEN="glpat-xxxxxxxxxxxxxxxx"
export ZEXXO_KEY="ZEXXO-KEY-ABC123"Cara pakai di bot
const { createGate } = require('dbzexo');
const gate = createGate();
const verdict = await gate.check(zexxo.user.id); // jid
if (!verdict.ok) process.exit(1);