feat: global banlist for role creation

GLOBAL_ADMINS env controls who can /gban, /gunban, /gbanlist.
Banned users blocked from /roleadd across all chats.
This commit is contained in:
devilreef 2026-02-17 21:38:38 +06:00
parent 85c7410ffb
commit d00295b291
11 changed files with 434 additions and 2 deletions

View file

@ -0,0 +1,8 @@
CREATE TABLE "banned_users" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"user_id" bigint NOT NULL,
"reason" text,
"banned_by" bigint NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "banned_users_user_id_unique" UNIQUE("user_id")
);