-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- ظ…ط¶ظٹظپ: localhost:3306
-- ظˆظ‚طھ ط§ظ„ط¬ظٹظ„: 25 ط£ظƒطھظˆط¨ط± 2025 ط§ظ„ط³ط§ط¹ط© 15:45
-- ط¥طµط¯ط§ط± ط§ظ„ط®ط§ط¯ظ…: 11.4.8-MariaDB-cll-lve-log
-- ظ†ط³ط®ط© PHP: 8.3.26

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- ظ‚ط§ط¹ط¯ط© ط¨ظٹط§ظ†ط§طھ: `supehgku_test0`
--

DELIMITER $$
--
-- ط§ظ„ط¥ط¬ط±ط§ط،ط§طھ
--
CREATE PROCEDURE `cleanup_expired_bans` ()   BEGIN
    DELETE FROM `limit_bans` 
    WHERE `banned_until` < NOW();
END$$

CREATE PROCEDURE `reset_expired_counters` ()   BEGIN
    UPDATE `limit_counters` 
    SET `day_used` = 0,
        `day_reset_at` = DATE_ADD(CURDATE(), INTERVAL 1 DAY)
    WHERE `day_reset_at` < NOW();
    
    UPDATE `limit_counters` 
    SET `week_used` = 0,
        `week_reset_at` = DATE_ADD(
            DATE_ADD(CURDATE(), INTERVAL (7 - WEEKDAY(CURDATE())) DAY),
            INTERVAL 1 WEEK
        )
    WHERE `week_reset_at` < NOW();
    
    UPDATE `limit_counters` 
    SET `month_used` = 0,
        `month_reset_at` = DATE_ADD(
            LAST_DAY(CURDATE()),
            INTERVAL 1 DAY
        )
    WHERE `month_reset_at` < NOW();
END$$

DELIMITER ;

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `account_groups`
--

CREATE TABLE `account_groups` (
  `id` int(11) NOT NULL,
  `group_name` varchar(64) NOT NULL,
  `description` text DEFAULT NULL,
  `is_default` tinyint(1) DEFAULT 0 COMMENT 'ط§ظ„ظ…ط¬ظ…ظˆط¹ط© ط§ظ„ط§ظپطھط±ط§ط¶ظٹط©',
  `active` tinyint(1) DEFAULT 1,
  `locked` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'ظ‚ظپظ„ ط§ظ„ظ…ط¬ظ…ظˆط¹ط© ظٹظ…ظ†ط¹ rename/delete',
  `priority` int(11) DEFAULT 0 COMMENT 'ط£ظˆظ„ظˆظٹط© ط§ظ„ط¨ط­ط«',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `group_name_lower` varchar(64) GENERATED ALWAYS AS (lcase(`group_name`)) STORED
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ظ…ط¬ظ…ظˆط¹ط§طھ ط§ظ„ط­ط³ط§ط¨ط§طھ ظ„طھظ†ط¸ظٹظ… ط§ظ„ظˆطµظˆظ„';

--
-- ط¥ط±ط¬ط§ط¹ ط£ظˆ ط§ط³طھظٹط±ط§ط¯ ط¨ظٹط§ظ†ط§طھ ط§ظ„ط¬ط¯ظˆظ„ `account_groups`
--

INSERT INTO `account_groups` (`id`, `group_name`, `description`, `is_default`, `active`, `locked`, `priority`, `created_at`) VALUES
(1, 'default', 'ط§ظ„ظ…ط¬ظ…ظˆط¹ط© ط§ظ„ط¹ط§ظ…ط© - طھط­طھظˆظٹ ط¬ظ…ظٹط¹ ط§ظ„ط­ط³ط§ط¨ط§طھ', 1, 1, 0, 0, '2025-10-22 19:51:06');

-- --------------------------------------------------------

--
-- Stand-in structure for view `active_bans`
-- (See below for the actual view)
--
CREATE TABLE `active_bans` (
`id` bigint(20)
,`user_id` bigint(20)
,`account_id` int(11)
,`banned_until` timestamp
,`reason` varchar(255)
,`created_at` timestamp
,`account_name` varchar(64)
,`hours_remaining` bigint(21)
);

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `allowed_users`
--

CREATE TABLE `allowed_users` (
  `id` bigint(20) NOT NULL,
  `bot_token` varchar(128) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `banned` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `bot_groups`
--

CREATE TABLE `bot_groups` (
  `bot_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='ط±ط¨ط· ط§ظ„ط¨ظˆطھط§طھ ط¨ط§ظ„ظ…ط¬ظ…ظˆط¹ط§طھ';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `bot_managers`
--

CREATE TABLE `bot_managers` (
  `id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL COMMENT 'ظ…ط¹ط±ظپ ط§ظ„ظ…ط¯ظٹط± ظپظٹ Telegram',
  `bot_token` varchar(128) DEFAULT NULL COMMENT 'طھظˆظƒظ† ط¨ظˆطھ ظ…ط­ط¯ط¯ ط£ظˆ NULL ظ„ظ„ظƒظ„',
  `permissions` text NOT NULL COMMENT 'ط§ظ„طµظ„ط§ط­ظٹط§طھ: 1,2,3 ط£ظˆ all',
  `username` varchar(64) DEFAULT NULL COMMENT 'ط§ط³ظ… ط§ظ„ظ…ط³طھط®ط¯ظ… ظ„ظ„ظ…ط¯ظٹط±',
  `added_by` bigint(20) NOT NULL COMMENT 'ط§ظ„ظ…ط§ظ„ظƒ ط§ظ„ط°ظٹ ط£ط¶ط§ظپظ‡',
  `is_active` tinyint(1) DEFAULT 1 COMMENT 'ظ†ط´ط· ط£ظˆ ظ…ط¹ط·ظ„',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط§ظ„ظ…ط¯ط±ط§ط، ط§ظ„ظپط±ط¹ظٹظˆظ† ظˆطµظ„ط§ط­ظٹط§طھظ‡ظ…';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `bot_message_templates`
--

CREATE TABLE `bot_message_templates` (
  `id` int(11) NOT NULL,
  `bot_id` int(11) NOT NULL,
  `template_key` varchar(64) NOT NULL,
  `template_text` text NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط±ط¯ظˆط¯ ظ…ط®طµطµط© ظ„ظƒظ„ ط¨ظˆطھ - طھطھط¬ط§ظˆط² ط§ظ„ط±ط¯ظˆط¯ ط§ظ„ط¹ط§ظ…ط© ظپظٹ message_templates';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `broadcast_jobs`
--

CREATE TABLE `broadcast_jobs` (
  `id` bigint(20) NOT NULL,
  `job_key` varchar(64) NOT NULL COMMENT 'Hash ظپط±ظٹط¯ ظ„ظ…ظ†ط¹ ط§ظ„طھظƒط±ط§ط±',
  `initiator_user_id` bigint(20) NOT NULL COMMENT 'ط§ظ„ظ…ط§ظ„ظƒ ط§ظ„ط°ظٹ ط¨ط¯ط£ ط§ظ„ط¨ط«',
  `target_type` enum('label','all') NOT NULL,
  `target_label` varchar(64) DEFAULT NULL COMMENT 'ط§ط³ظ… ط§ظ„ط¨ظˆطھ ط¥ظ† ظƒط§ظ† label',
  `message_text` text NOT NULL,
  `media_type` enum('text','photo','video') DEFAULT 'text',
  `media_id` varchar(255) DEFAULT NULL,
  `status` enum('pending','running','completed','failed') DEFAULT 'pending',
  `total_recipients` int(11) DEFAULT 0,
  `sent_count` int(11) DEFAULT 0,
  `fail_count` int(11) DEFAULT 0,
  `scheduled_at` timestamp NULL DEFAULT NULL COMMENT 'ظ„ظ„ط¬ط¯ظˆظ„ط© ط§ظ„ظ…ط³طھظ‚ط¨ظ„ظٹط©',
  `started_at` timestamp NULL DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  `error_message` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط¬ط¯ظˆظ„ ظ…ظ‡ط§ظ… ط§ظ„ط¨ط« ط§ظ„ط¢ظ…ظ†';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `broadcast_log`
--

CREATE TABLE `broadcast_log` (
  `id` bigint(20) NOT NULL,
  `bot_token` varchar(128) NOT NULL COMMENT 'طھظˆظƒظ† ط§ظ„ط¨ظˆطھ',
  `manager_id` bigint(20) NOT NULL COMMENT 'ظ…ط¹ط±ظپ ط§ظ„ظ…ط¯ظٹط± ط§ظ„ط°ظٹ ظ‚ط§ظ… ط¨ط§ظ„ط¨ط«',
  `message_text` text NOT NULL COMMENT 'ظ†طµ ط§ظ„ط±ط³ط§ظ„ط© ط§ظ„ظ…ط±ط³ظ„ط©',
  `recipients_count` int(11) DEFAULT 0 COMMENT 'ط¹ط¯ط¯ ط§ظ„ظ…ط³طھظ„ظ…ظٹظ†',
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط³ط¬ظ„ ط¹ظ…ظ„ظٹط§طھ ط§ظ„ط¨ط« ظ„ظ„ظ…ط¯ط±ط§ط،';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `control_sessions`
--

CREATE TABLE `control_sessions` (
  `id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `action` varchar(64) NOT NULL,
  `bot_token` varchar(128) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Stand-in structure for view `current_usage`
-- (See below for the actual view)
--
CREATE TABLE `current_usage` (
`id` bigint(20)
,`user_id` bigint(20)
,`account_id` int(11)
,`day_used` int(11)
,`week_used` int(11)
,`month_used` int(11)
,`day_reset_at` timestamp
,`week_reset_at` timestamp
,`month_reset_at` timestamp
,`updated_at` timestamp
,`account_name` varchar(64)
,`current_day_used` int(11)
,`current_week_used` int(11)
,`current_month_used` int(11)
);

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `group_accounts`
--

CREATE TABLE `group_accounts` (
  `group_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='ط±ط¨ط· ط§ظ„ط­ط³ط§ط¨ط§طھ ط¨ط§ظ„ظ…ط¬ظ…ظˆط¹ط§طھ';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `limits_bot`
--

CREATE TABLE `limits_bot` (
  `bot_label` varchar(64) NOT NULL,
  `mode` enum('daily','weekly','monthly') NOT NULL,
  `per_day` int(11) NOT NULL,
  `weekly_cap` int(11) DEFAULT NULL,
  `monthly_cap` int(11) DEFAULT NULL,
  `ban_days` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط­ط¯ظˆط¯ ط®ط§طµط© ظ„ظƒظ„ ط¨ظˆطھ (طھطھط¬ط§ظˆط² ط§ظ„ط­ط¯ظˆط¯ ط§ظ„ط¹ط§ظ…ط©)';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `limits_global`
--

CREATE TABLE `limits_global` (
  `id` int(11) NOT NULL,
  `mode` enum('daily','weekly','monthly') NOT NULL DEFAULT 'daily' COMMENT 'ط§ظ„ظˆط¶ط¹: ظٹظˆظ…ظٹ/ط£ط³ط¨ظˆط¹ظٹ/ط´ظ‡ط±ظٹ',
  `per_day` int(11) NOT NULL DEFAULT 2 COMMENT 'ط§ظ„ط­ط¯ ط§ظ„ظٹظˆظ…ظٹ (ط¹ط¯ط¯ ط§ظ„ط£ظƒظˆط§ط¯ ط§ظ„ظ…ط³ظ…ظˆط­ ط¨ظ‡ط§ ظپظٹ ط§ظ„ظٹظˆظ…)',
  `weekly_cap` int(11) DEFAULT NULL COMMENT 'ط§ظ„ط³ظ‚ظپ ط§ظ„ط£ط³ط¨ظˆط¹ظٹ (ظ„ظ„ظˆط¶ط¹ weekly ظپظ‚ط·)',
  `monthly_cap` int(11) DEFAULT NULL COMMENT 'ط§ظ„ط³ظ‚ظپ ط§ظ„ط´ظ‡ط±ظٹ (ظ„ظ„ظˆط¶ط¹ monthly ظپظ‚ط·)',
  `ban_days` int(11) DEFAULT NULL COMMENT 'ط¹ط¯ط¯ ط£ظٹط§ظ… ط§ظ„ط­ط¸ط± ط¨ط¹ط¯ ط§ظ„طھط¬ط§ظˆط² (NULL = ظ„ط§ ط­ط¸ط±)',
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط§ظ„ط­ط¯ظˆط¯ ط§ظ„ط¹ط§ظ…ط© ط§ظ„ط§ظپطھط±ط§ط¶ظٹط© ظ„ط¬ظ…ظٹط¹ ط§ظ„ط¨ظˆطھط§طھ';

--
-- ط¥ط±ط¬ط§ط¹ ط£ظˆ ط§ط³طھظٹط±ط§ط¯ ط¨ظٹط§ظ†ط§طھ ط§ظ„ط¬ط¯ظˆظ„ `limits_global`
--

INSERT INTO `limits_global` (`id`, `mode`, `per_day`, `weekly_cap`, `monthly_cap`, `ban_days`, `updated_at`) VALUES
(1, 'weekly', 1, 2, NULL, 1000, '2025-10-24 17:09:59');

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `limits_override`
--

CREATE TABLE `limits_override` (
  `account_id` int(11) NOT NULL,
  `mode` enum('daily','weekly','monthly') NOT NULL,
  `per_day` int(11) NOT NULL,
  `cap` int(11) DEFAULT NULL COMMENT 'ط§ظ„ط³ظ‚ظپ (ط£ط³ط¨ظˆط¹ظٹ ط£ظˆ ط´ظ‡ط±ظٹ ط­ط³ط¨ ط§ظ„ظˆط¶ط¹)',
  `ban_days` int(11) DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='طھط¬ط§ظˆط² ط§ظ„ط­ط¯ظˆط¯ ظ„ط­ط³ط§ط¨ ظ…ط­ط¯ط¯ (ط£ط¹ظ„ظ‰ ط£ظˆظ„ظˆظٹط©)';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `limit_bans`
--

CREATE TABLE `limit_bans` (
  `id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL COMMENT 'ظ…ط¹ط±ظپ ط§ظ„ظ…ط³طھط®ط¯ظ… ط§ظ„ظ…ط­ط¸ظˆط±',
  `account_id` int(11) NOT NULL COMMENT 'ظ…ط¹ط±ظپ ط§ظ„ط­ط³ط§ط¨',
  `bot_label` varchar(50) NOT NULL COMMENT 'طھط³ظ…ظٹط© ط§ظ„ط¨ظˆطھ',
  `banned_until` timestamp NOT NULL COMMENT 'ط§ظ„ط­ط¸ط± ط³ط§ط±ظٹ ط­طھظ‰ ظ‡ط°ط§ ط§ظ„ظˆظ‚طھ',
  `reason` varchar(255) DEFAULT NULL COMMENT 'ط³ط¨ط¨ ط§ظ„ط­ط¸ط± (weekly_exceeded, monthly_exceeded, manual)',
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط³ط¬ظ„ ط§ظ„ط­ط¸ط± ط§ظ„ظ…ط¤ظ‚طھ';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `limit_counters`
--

CREATE TABLE `limit_counters` (
  `id` bigint(20) NOT NULL,
  `user_id` bigint(20) NOT NULL COMMENT 'ظ…ط¹ط±ظپ ط§ظ„ظ…ط³طھط®ط¯ظ… ظپظٹ Telegram',
  `account_id` int(11) NOT NULL COMMENT 'ظ…ط¹ط±ظپ ط§ظ„ط­ط³ط§ط¨ ظ…ظ† steam_accounts',
  `bot_label` varchar(50) NOT NULL COMMENT 'طھط³ظ…ظٹط© ط§ظ„ط¨ظˆطھ',
  `day_used` int(11) DEFAULT 0 COMMENT 'ط¹ط¯ط¯ ط§ظ„ط£ظƒظˆط§ط¯ ط§ظ„ظ…ط³طھط®ط¯ظ…ط© ط§ظ„ظٹظˆظ…',
  `week_used` int(11) DEFAULT 0 COMMENT 'ط¹ط¯ط¯ ط§ظ„ط£ظƒظˆط§ط¯ ط§ظ„ظ…ط³طھط®ط¯ظ…ط© ظ‡ط°ط§ ط§ظ„ط£ط³ط¨ظˆط¹',
  `month_used` int(11) DEFAULT 0 COMMENT 'ط¹ط¯ط¯ ط§ظ„ط£ظƒظˆط§ط¯ ط§ظ„ظ…ط³طھط®ط¯ظ…ط© ظ‡ط°ط§ ط§ظ„ط´ظ‡ط±',
  `day_reset_at` timestamp NULL DEFAULT NULL COMMENT 'ظ…ظˆط¹ط¯ ط¥ط¹ط§ط¯ط© طھط¹ظٹظٹظ† ط§ظ„ط¹ط¯ط§ط¯ ط§ظ„ظٹظˆظ…ظٹ',
  `week_reset_at` timestamp NULL DEFAULT NULL COMMENT 'ظ…ظˆط¹ط¯ ط¥ط¹ط§ط¯ط© طھط¹ظٹظٹظ† ط§ظ„ط¹ط¯ط§ط¯ ط§ظ„ط£ط³ط¨ظˆط¹ظٹ',
  `month_reset_at` timestamp NULL DEFAULT NULL COMMENT 'ظ…ظˆط¹ط¯ ط¥ط¹ط§ط¯ط© طھط¹ظٹظٹظ† ط§ظ„ط¹ط¯ط§ط¯ ط§ظ„ط´ظ‡ط±ظٹ',
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط¹ط¯ط§ط¯ط§طھ ط§ظ„ط§ط³طھط®ط¯ط§ظ… ظ„ظƒظ„ ظ…ط³طھط®ط¯ظ… أ— ط­ط³ط§ط¨';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `limit_messages`
--

CREATE TABLE `limit_messages` (
  `event` varchar(32) NOT NULL,
  `text` text NOT NULL,
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط±ط³ط§ط¦ظ„ ط§ظ„ط£ط­ط¯ط§ط« ط§ظ„ظ‚ط§ط¨ظ„ط© ظ„ظ„طھط®طµظٹطµ';

--
-- ط¥ط±ط¬ط§ط¹ ط£ظˆ ط§ط³طھظٹط±ط§ط¯ ط¨ظٹط§ظ†ط§طھ ط§ظ„ط¬ط¯ظˆظ„ `limit_messages`
--

INSERT INTO `limit_messages` (`event`, `text`, `updated_at`) VALUES
('on_banned', 'ًںڑ« طھظ… ط­ط¸ط±ظƒ ظ…ظ† ط§ظ„ط­ط³ط§ط¨ {account} ظ„ظ…ط¯ط© {ban_days} ط£ظٹط§ظ….\n\nًں“… ط§ظ„ط­ط¸ط± ظٹظ†طھظ‡ظٹ ظپظٹ: {banned_until}\n\nط§ظ„ط³ط¨ط¨: طھط¬ط§ظˆط²طھ ط§ظ„ط­ط¯ ط§ظ„ظ…ط³ظ…ظˆط­.', '2025-10-24 12:54:02'),
('on_daily_near', 'âڑ ï¸ڈ طھظ†ط¨ظٹظ‡: ط§ظ‚طھط±ط¨طھ ظ…ظ† ط­ط¯ظƒ ط§ظ„ظٹظˆظ…ظٹ!\n\nًں“ٹ ط§ظ„ط§ط³طھط®ط¯ط§ظ…: {day_used}/{per_day}\nًں’ژ ط§ظ„ظ…طھط¨ظ‚ظٹ: {remaining} ط·ظ„ط¨ط§طھ\nًں”„ ط¥ط¹ط§ط¯ط© ط§ظ„طھط¹ظٹظٹظ†: {reset_time}', '2025-10-24 12:54:02'),
('on_limit_hit', 'âڈ³ ظ„ظ‚ط¯ ط§ط³طھظ‡ظ„ظƒطھ ط­ط¯ظƒ ط§ظ„ظٹظˆظ…ظٹ ({day_used}/{per_day}) ظ„ظ„ط­ط³ط§ط¨ {account}.\n\nًں”„ ط¥ط¹ط§ط¯ط© ط§ظ„طھط¹ظٹظٹظ†: {reset_time}\n\nًں’، طھظˆط§طµظ„ ظ…ط¹ ط§ظ„ظ…ط§ظ„ظƒ ظ„ط²ظٹط§ط¯ط© ط­ط¯ظˆط¯ظƒ.', '2025-10-24 12:54:02'),
('on_monthly_near', 'âڑ ï¸ڈ طھظ†ط¨ظٹظ‡: ط§ظ‚طھط±ط¨طھ ظ…ظ† ط§ظ„ط­ط¯ ط§ظ„ط´ظ‡ط±ظٹ!\n\nًں“ٹ ط§ظ„ط§ط³طھط®ط¯ط§ظ…: {month_used}/{monthly_cap}\nًں’ژ ط§ظ„ظ…طھط¨ظ‚ظٹ: {remaining} ط·ظ„ط¨ط§طھ\nًں”„ ط¥ط¹ط§ط¯ط© ط§ظ„طھط¹ظٹظٹظ†: ط¨ط¯ط§ظٹط© ط§ظ„ط´ظ‡ط± ط§ظ„ظ‚ط§ط¯ظ…', '2025-10-24 12:54:02'),
('on_share_warning', 'âڑ ï¸ڈ طھط­ط°ظٹط±: ظ‡ط°ط§ ظ‡ظˆ ط§ظ„ط·ظ„ط¨ ط§ظ„ط±ط§ط¨ط¹ ظ‡ط°ط§ ط§ظ„ط£ط³ط¨ظˆط¹!\n\nًں”’ ظ„ط§ طھط´ط§ط±ظƒ ط§ظ„ط­ط³ط§ط¨ {account} ظ…ط¹ ط¢ط®ط±ظٹظ†.\n\nًں“ٹ ط§ظ„ط§ط³طھط®ط¯ط§ظ… ط§ظ„ط£ط³ط¨ظˆط¹ظٹ: {week_used}/{weekly_cap}\nâ›”ï¸ڈ ط§ظ„ط­ط¯ ط§ظ„ط£ظ‚طµظ‰: {weekly_cap} ط·ظ„ط¨ط§طھ/ط£ط³ط¨ظˆط¹\nًںڑ« ط§ظ„طھط¬ط§ظˆط² ظٹط¤ط¯ظٹ ظ„ظ„ط­ط¸ط± ظ„ظ…ط¯ط© {ban_days} ط£ظٹط§ظ….', '2025-10-24 12:54:02'),
('on_unbanned', 'âœ… <b>طھظ… ط¥ظ„ط؛ط§ط، ط§ظ„ط­ط¸ط±</b>\n\nظٹظ…ظƒظ†ظƒ ط§ظ„ط¢ظ† ط§ط³طھط®ط¯ط§ظ… ط­ط³ط§ط¨ <code>{account}</code> ظ…ط±ط© ط£ط®ط±ظ‰.\n\nâڑ ï¸ڈ ظٹظڈط±ط¬ظ‰ ط§ظ„ط§ظ„طھط²ط§ظ… ط¨ط§ظ„ط­ط¯ظˆط¯ ظ„طھط¬ظ†ط¨ ط§ظ„ط­ط¸ط± ظ…ط¬ط¯ط¯ط§ظ‹.', '2025-10-23 22:44:50'),
('on_weekly_near', 'âڑ ï¸ڈ طھظ†ط¨ظٹظ‡: ط§ظ‚طھط±ط¨طھ ظ…ظ† ط§ظ„ط­ط¯ ط§ظ„ط£ط³ط¨ظˆط¹ظٹ!\n\nًں“ٹ ط§ظ„ط§ط³طھط®ط¯ط§ظ…: {week_used}/{weekly_cap}\nًں’ژ ط§ظ„ظ…طھط¨ظ‚ظٹ: {remaining} ط·ظ„ط¨ط§طھ\nًں”„ ط¥ط¹ط§ط¯ط© ط§ظ„طھط¹ظٹظٹظ†: {reset_time}', '2025-10-24 12:54:02');

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `message_templates`
--

CREATE TABLE `message_templates` (
  `key` varchar(64) NOT NULL,
  `text` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- ط¥ط±ط¬ط§ط¹ ط£ظˆ ط§ط³طھظٹط±ط§ط¯ ط¨ظٹط§ظ†ط§طھ ط§ظ„ط¬ط¯ظˆظ„ `message_templates`
--

INSERT INTO `message_templates` (`key`, `text`) VALUES
('code_reply', 'ًں”گ ط§ظ„ط­ط³ط§ط¨: {account}\nط§ظ„ظƒظˆط¯: <code>{code}</code>\nâڈ³ طµط§ظ„ط­ ظ„ظ…ط¯ط© ~30 ط«ط§ظ†ظٹط©.'),
('help_part1', 'ًں§  <b>ظ„ظˆط­ط© ط£ظˆط§ظ…ط± ط§ظ„ط¥ط¯ط§ط±ط© ط§ظ„ط´ط§ظ…ظ„ط©</b>\r\n\r\nط¬ظ…ظٹط¹ ط§ظ„ط£ظˆط§ظ…ط± ظ„ظ„ظ…ط§ظ„ظƒ ظپظ‚ط·.\r\n\r\nًں›  <b>ظ‚ط³ظ… ط¥ط¯ط§ط±ط© ط§ظ„ط¨ظˆطھط§طھ</b>\r\n\r\n<b>/addbot</b> <code>label token [channel] [max]</code>\r\nâ‍،ï¸ڈ ط¥ط¶ط§ظپط© ط¨ظˆطھ ط¬ط¯ظٹط¯ ظ„ظ„ظ†ط¸ط§ظ…\r\nًں’، <code>/addbot mybot 7123456:ABC @channel 100</code>\r\nًں“‌ <i>label: ط§ط³ظ… ط§ظ„ط¨ظˆطھطŒ token: طھظˆظƒظ† ظ…ظ† BotFatherطŒ channel: ظ‚ظ†ط§ط© ط§ط´طھط±ط§ظƒ ط¥ظ„ط²ط§ظ…ظٹطŒ max: ط£ظ‚طµظ‰ ط¹ط¯ط¯ ظ…ط³طھط®ط¯ظ…ظٹظ†</i>\r\nâڑ ï¸ڈ <i>ظ„طھط­ط¯ظٹط¯ ط¹ط¯ط¯ ط§ظ„ط·ظ„ط¨ط§طھ: ط§ط³طھط®ط¯ظ… ظ†ط¸ط§ظ… ط§ظ„ط­ط¯ظˆط¯ ط§ظ„ط°ظƒظٹ (/help limits)</i>\r\n\r\n<b>/list</b>\r\nâ‍،ï¸ڈ ط¹ط±ط¶ ط¬ظ…ظٹط¹ ط§ظ„ط¨ظˆطھط§طھ ط§ظ„ظ…ط³ط¬ظ„ط© ظ…ط¹ طھظپط§طµظٹظ„ظ‡ط§\r\nًں“ٹ ظٹط¹ط±ط¶: ط§ظ„ط§ط³ظ…طŒ ط¹ط¯ط¯ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ†طŒ ط§ظ„ط­ط§ظ„ط©طŒ ط§ظ„ظ‚ظ†ط§ط©\r\n\r\n<b>/bot_rename</b> <code>old_label new_label</code> ًں†•\r\nâ‍،ï¸ڈ طھط¹ط¯ظٹظ„ ط§ط³ظ… ط¨ظˆطھ (ظ…ط¹ طھط­ط¯ظٹط« طھظ„ظ‚ط§ط¦ظٹ ظ„ظ„ط­ط¯ظˆط¯ ظˆط§ظ„ط¹ط¯ط§ط¯ط§طھ)\r\nًں’، <code>/bot_rename test1 test_new</code>\r\n\r\n<b>/bot_details</b> <code>label</code> ًں†•\r\nâ‍،ï¸ڈ ظ…ط¹ظ„ظˆظ…ط§طھ طھظپطµظٹظ„ظٹط©: ط§ظ„ظ…ط¬ظ…ظˆط¹ط§طھ + ط§ظ„ط­ط³ط§ط¨ط§طھ + ط§ظ„ط­ط¯ظˆط¯\r\nًں’، <code>/bot_details test1</code>\r\n\r\n<b>/pause</b> <code>label</code>\r\nâ‍،ï¸ڈ ط¥ظٹظ‚ط§ظپ ط¨ظˆطھ ظ…ط¤ظ‚طھط§ظ‹ (ظ„ط§ ظٹط³طھط¬ظٹط¨ ظ„ظ„ظ…ط³طھط®ط¯ظ…ظٹظ†)\r\nًں’، <code>/pause mybot</code>\r\n\r\n<b>/resume</b> <code>label</code>\r\nâ‍،ï¸ڈ طھط´ط؛ظٹظ„ ط¨ظˆطھ ظ…طھظˆظ‚ظپ\r\nًں’، <code>/resume mybot</code>\r\n\r\n<b>/setmax</b> <code>label n</code>\r\nâ‍،ï¸ڈ طھط­ط¯ظٹط¯ ط§ظ„ط­ط¯ ط§ظ„ط£ظ‚طµظ‰ ظ„ط¹ط¯ط¯ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ†\r\nًں’، <code>/setmax mybot 500</code>\r\n\r\n<b>/incmax</b> <code>label delta</code>\r\nâ‍،ï¸ڈ ط²ظٹط§ط¯ط© ط§ظ„ط­ط¯ ط§ظ„ط£ظ‚طµظ‰ ط¨ظ…ظ‚ط¯ط§ط± ظ…ط¹ظٹظ†\r\nًں’، <code>/incmax mybot 100</code> = ط²ظٹط§ط¯ط© 100 ظ…ط³طھط®ط¯ظ…\r\n\r\n<b>/setchannel</b> <code>label channel_id</code>\r\nâ‍،ï¸ڈ طھط¹ط¯ظٹظ„ ظ‚ظ†ط§ط© ط§ظ„ط§ط´طھط±ط§ظƒ ط§ظ„ط¥ظ„ط²ط§ظ…ظٹط©\r\nًں’، <code>/setchannel mybot @mychannel</code>\r\nًں’، <code>/setchannel mybot -1001234567890</code>\r\n\r\n<b>/settoken</b> <code>label new_token</code>\r\nâ‍،ï¸ڈ طھط­ط¯ظٹط« طھظˆظƒظ† ط§ظ„ط¨ظˆطھ\r\nًں’، <code>/settoken mybot 7123456:NEW_TOKEN</code>\r\n\r\n<b>/setwelcome</b> <code>label text</code>\r\nâ‍،ï¸ڈ طھط¹ط¯ظٹظ„ ط±ط³ط§ظ„ط© ط§ظ„طھط±ط­ظٹط¨\r\nًں’، <code>/setwelcome mybot ظ…ط±ط­ط¨ط§ظ‹ ط¨ظƒ ظپظٹ ط§ظ„ط¨ظˆطھ!</code>\r\n\r\n<b>/refreshbot</b> <code>label</code>\r\nâ‍،ï¸ڈ ط¥ط¹ط§ط¯ط© طھظ‡ظٹط¦ط© Webhook (ظ…ظپظٹط¯ ط¨ط¹ط¯ طھط؛ظٹظٹط± ط§ظ„ظ†ط·ط§ظ‚)\r\nًں’، <code>/refreshbot mybot</code>\r\n\r\n<b>/deletebot</b> <code>label confirm</code>\r\nâ‍،ï¸ڈ ط­ط°ظپ ط§ظ„ط¨ظˆطھ ظ†ظ‡ط§ط¦ظٹط§ظ‹ ظ…ظ† ط§ظ„ظ†ط¸ط§ظ…\r\nâڑ ï¸ڈ ظٹطھط·ظ„ط¨ ظƒظ„ظ…ط© confirm ظ„ظ„طھط£ظƒظٹط¯\r\nًں’، <code>/deletebot mybot confirm</code>'),
('help_part10', 'ًں’، <b>ط£ظ…ط«ظ„ط© ط¹ظ…ظ„ظٹط© - ط­ط¯ظˆط¯ ط§ظ„ط¨ظˆطھط§طھ</b> âœ¨\r\n\r\n<b>ظ…ط«ط§ظ„ 1: ط¨ظˆطھ VIP ط¨ط­ط¯ظˆط¯ ط£ط¹ظ„ظ‰</b>\r\n<code>/set_weekly vipbot 5 20 3</code>\r\nâœ… 5 ظƒظˆط¯/ظٹظˆظ…طŒ 20/ط£ط³ط¨ظˆط¹طŒ ط­ط¸ط± 3 ط£ظٹط§ظ… ظپظ‚ط·\r\n\r\n<b>ظ…ط«ط§ظ„ 2: ط¨ظˆطھ طھط¬ط±ظٹط¨ظٹ ط¨ط­ط¯ ظ…ظ†ط®ظپط¶</b>\r\n<code>/set_daily testbot 1</code>\r\nâœ… ظƒظˆط¯ ظˆط§ط­ط¯ ظٹظˆظ…ظٹط§ظ‹طŒ ط±ظپط¶ ظپظˆط±ظٹ ط¨ط¹ط¯ظ‡ط§\r\n\r\n<b>ظ…ط«ط§ظ„ 3: ط¨ظˆطھ ظ…طھظ…ظٹط² ط¨ط­ط¯ ط´ظ‡ط±ظٹ</b>\r\n<code>/set_monthly premiumbot 10 100 7</code>\r\nâœ… 10 ظƒظˆط¯/ظٹظˆظ…طŒ 100/ط´ظ‡ط±طŒ ط­ط¸ط± 7 ط£ظٹط§ظ…\r\n\r\n<b>ظ…ط«ط§ظ„ 4: ط¹ط±ط¶ ط¬ظ…ظٹط¹ ط§ظ„ط¨ظˆطھط§طھ ظˆط­ط¯ظˆط¯ظ‡ط§</b>\r\n<code>/show_limit bot</code>\r\nâœ… ظ‚ط§ط¦ظ…ط© ظƒط§ظ…ظ„ط© ط¨ط§ظ„ط¨ظˆطھط§طھ ظˆط­ط¯ظˆط¯ظ‡ط§ ط§ظ„ط®ط§طµط© ظˆط§ظ„ط¹ط§ظ…ط©\r\n\r\n<b>ظ…ط«ط§ظ„ 5: ط¹ط±ط¶ ط¨ظˆطھ ظ…ط­ط¯ط¯</b>\r\n<code>/show_limit vipbot</code>\r\n<code>/show_limit bot/vipbot</code>\r\nâœ… ط¹ط±ط¶ طھظپطµظٹظ„ظٹ ظ„ط­ط¯ظˆط¯ ط§ظ„ط¨ظˆطھ\r\n\r\n<b>ظ…ط«ط§ظ„ 6: ط­ط°ظپ ط­ط¯ظˆط¯ ط®ط§طµط©</b>\r\n<code>/bot_limit_clear testbot</code>\r\nâœ… ظٹط¹ظˆط¯ ط§ظ„ط¨ظˆطھ ظ„ط§ط³طھط®ط¯ط§ظ… ط§ظ„ط­ط¯ظˆط¯ ط§ظ„ط¹ط§ظ…ط©\r\n\r\n<b>ظ…ط«ط§ظ„ 7: ط­ط³ط§ط¨ VIP ط¨ط­ط¯ظˆط¯ ط®ط§طµط©</b>\r\n<code>/override_account 5 weekly 10 50 1</code>\r\nâœ… 10 ظƒظˆط¯/ظٹظˆظ…طŒ 50/ط£ط³ط¨ظˆط¹طŒ ط­ط¸ط± ظٹظˆظ… ظˆط§ط­ط¯ ظپظ‚ط·\r\n\r\nâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پ\r\nًں’، <b>ظ†طµط§ط¦ط­:</b>\r\nâ€¢ ط§ط³طھط®ط¯ظ… <code>/show_limit bot</code> ظ„ظ…ط±ط§ط¬ط¹ط© ط¬ظ…ظٹط¹ ط§ظ„ط­ط¯ظˆط¯\r\nâ€¢ ط§ظ„ط¨ظˆطھط§طھ ط¨ط¯ظˆظ† ط­ط¯ظˆط¯ ط®ط§طµط© طھط³طھط®ط¯ظ… ط§ظ„ط­ط¯ظˆط¯ ط§ظ„ط¹ط§ظ…ط© طھظ„ظ‚ط§ط¦ظٹط§ظ‹\r\nâ€¢ ظٹظ…ظƒظ†ظƒ طھط؛ظٹظٹط± ط­ط¯ظˆط¯ ط£ظٹ ط¨ظˆطھ ظپظٹ ط£ظٹ ظˆظ‚طھ\r\nâ€¢ ط§ظ„ط£ظˆظ„ظˆظٹط©: override > bot > global'),
('help_part2', 'ًں‘¥ <b>ظ‚ط³ظ… ط¥ط¯ط§ط±ط© ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ†</b>\n\n<b>/users</b> <code>label</code>\nâ‍،ï¸ڈ ط¹ط±ط¶ ظ…ط³طھط®ط¯ظ…ظٹ ط¨ظˆطھ ظ…ط¹ظٹظ† (ط¢ط®ط± 200)\nًں’، <code>/users mybot</code>\n\n<b>/allusers</b>\nâ‍،ï¸ڈ ط¹ط±ط¶ ط¬ظ…ظٹط¹ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ† ظپظٹ ط§ظ„ظ†ط¸ط§ظ… (DISTINCT)\nًں“ٹ ظٹط¹ط±ط¶: user_idطŒ ط¹ط¯ط¯ ط§ظ„ط¨ظˆطھط§طھ ط§ظ„ظ…ط´طھط±ظƒ ط¨ظ‡ط§\n\n<b>/ban</b> <code>user_id [label]</code>\nâ‍،ï¸ڈ ط­ط¸ط± ظ…ط³طھط®ط¯ظ… ظ…ظ† ط¨ظˆطھ ط£ظˆ ظ…ظ† ط¬ظ…ظٹط¹ ط§ظ„ط¨ظˆطھط§طھ\nًں’، <code>/ban 123456789</code> = ط­ط¸ط± ظ…ظ† ظƒظ„ ط§ظ„ط¨ظˆطھط§طھ\nًں’، <code>/ban 123456789 mybot</code> = ط­ط¸ط± ظ…ظ† mybot ظپظ‚ط·\n\n<b>/unban</b> <code>user_id [label]</code>\nâ‍،ï¸ڈ ط¥ظ„ط؛ط§ط، ط­ط¸ط± ظ…ط³طھط®ط¯ظ…\nًں’، <code>/unban 123456789</code> = ظپظƒ ظ…ظ† ظƒظ„ ط§ظ„ط¨ظˆطھط§طھ\nًں’، <code>/unban 123456789 mybot</code> = ظپظƒ ظ…ظ† mybot ظپظ‚ط·\n\n<b>/checkuser</b> <code>user_id</code>\nâ‍،ï¸ڈ ط¹ط±ط¶ ظ†ط´ط§ط· ط§ظ„ظ…ط³طھط®ط¯ظ… ظˆط¹ط¯ط¯ ط§ظ„ط£ظƒظˆط§ط¯ ط§ظ„ظ…ط³ط­ظˆط¨ط©\nًں’، <code>/checkuser 123456789</code>\nًں“ٹ ظٹط¹ط±ط¶: ط§ظ„ط¨ظˆطھط§طھ ط§ظ„ظ…ط³طھط®ط¯ظ…ط©طŒ ط¹ط¯ط¯ ط§ظ„ط·ظ„ط¨ط§طھطŒ ط¢ط®ط± ظ†ط´ط§ط·\n\n<b>/reset_limits</b> <code>user_id</code>\nâ‍،ï¸ڈ ط¥ط¹ط§ط¯ط© ط¶ط¨ط· ط§ظ„ظ…ط­ط§ظˆظ„ط§طھ ط§ظ„ظٹظˆظ…ظٹط© ظ„ظ„ظ…ط³طھط®ط¯ظ…\nًں’، <code>/reset_limits 123456789</code>\nًں”„ ظٹط­ط°ظپ ط·ظ„ط¨ط§طھ ط¢ط®ط± 24 ط³ط§ط¹ط©'),
('help_part3', 'ًںژ® <b>ظ‚ط³ظ… ط§ظ„ط­ط³ط§ط¨ط§طھ</b>\r\n\r\n<b>/accounts</b>\r\nâ‍،ï¸ڈ ط¹ط±ط¶ ط¬ظ…ظٹط¹ ط­ط³ط§ط¨ط§طھ Steam Guard\r\nًں“ٹ ظٹط¹ط±ط¶: ط§ظ„ط§ط³ظ…طŒ ط§ظ„ط­ط§ظ„ط©طŒ ظ…ط­ط§ظˆظ„ط§طھ ظٹظˆظ…ظٹط© ظ…ط®طµطµط©\r\n\r\n<b>/addaccount</b> <code>name secret</code>\r\nâ‍،ï¸ڈ ط¥ط¶ط§ظپط© ط­ط³ط§ط¨ Steam Guard ط¬ط¯ظٹط¯\r\nًں’، <code>/addaccount main_acc dG90YWxseV9yYW5kb20=</code>\r\nًں“‌ <i>secret ظٹط¬ط¨ ط£ظ† ظٹظƒظˆظ† base64</i>\r\n\r\n<b>/addaccounts</b>\r\nâ‍،ï¸ڈ ط¥ط¶ط§ظپط© ط¹ط¯ط© ط­ط³ط§ط¨ط§طھ ط¯ظپط¹ط© ظˆط§ط­ط¯ط©\r\nًں“‌ ط£ط±ط³ظ„ ط§ظ„ط£ظ…ط±طŒ ط«ظ… ط£ط±ط³ظ„ ظپظٹ ط±ط³ط§ظ„ط© ظ…ظ†ظپطµظ„ط©:\r\n<code>account1:secret1\r\naccount2:secret2\r\naccount3:secret3</code>\r\nًں’، ظ…ط«ط§ظ„:\r\n<code>main:ABC123==\r\nvip:XYZ789==\r\nbackup:DEF456==</code>\r\n\r\n<b>/editaccount</b> <code>name secret [active]</code>\r\nâ‍،ï¸ڈ طھط¹ط¯ظٹظ„ ط¨ظٹط§ظ†ط§طھ ط­ط³ط§ط¨\r\nًں’، <code>/editaccount main NEW_SECRET 1</code>\r\nًں’، <code>/editaccount main same 0</code> = طھط¹ط·ظٹظ„ ط¨ط¯ظˆظ† طھط؛ظٹظٹط± ط§ظ„ط³ط±\r\n\r\n<b>/disableaccount</b> <code>name</code>\r\nâ‍،ï¸ڈ طھط¹ط·ظٹظ„ ط­ط³ط§ط¨ (ظ„ظ† ظٹظڈط³طھط®ط¯ظ… ظپظٹ طھظˆظ„ظٹط¯ ط§ظ„ط£ظƒظˆط§ط¯)\r\nًں’، <code>/disableaccount backup</code>\r\n\r\n<b>/enableaccount</b> <code>name</code>\r\nâ‍،ï¸ڈ طھظپط¹ظٹظ„ ط­ط³ط§ط¨ ظ…ط¹ط·ظ„\r\nًں’، <code>/enableaccount backup</code>\r\n\r\n<b>/account_details</b> <code>name_or_id</code> ًں†•\r\nâ‍،ï¸ڈ ظ…ط¹ظ„ظˆظ…ط§طھ ط´ط§ظ…ظ„ط©: ط§ظ„ظ…ط¬ظ…ظˆط¹ط© + ط§ظ„ط¨ظˆطھط§طھ + ط§ظ„ط­ط¯ظˆط¯ ط§ظ„ط®ط§طµط©\r\nًں’، <code>/account_details steamuser1</code>\r\nًں’، <code>/account_details 42</code>\r\n\r\n<b>/deleteaccount</b> <code>name</code>\r\nâ‍،ï¸ڈ ط­ط°ظپ ط­ط³ط§ط¨ ظ†ظ‡ط§ط¦ظٹط§ظ‹ ظ…ظ† ط§ظ„ظ†ط¸ط§ظ…\r\nâڑ ï¸ڈ ظ„ط§ ظٹظ…ظƒظ† ط§ظ„طھط±ط§ط¬ط¹!\r\nًں’، <code>/deleteaccount old_account</code>\r\n\r\n<b>/accountinfo</b> <code>name</code>\r\nâ‍،ï¸ڈ ط¹ط±ط¶ ظ…ط¹ظ„ظˆظ…ط§طھ طھظپطµظٹظ„ظٹط© ط¹ظ† ط­ط³ط§ط¨\r\nًں’، <code>/accountinfo main</code>\r\nًں“ٹ ظٹط¹ط±ط¶: ط§ظ„ط­ط§ظ„ط©طŒ ط¥ط¬ظ…ط§ظ„ظٹ ط§ظ„ط·ظ„ط¨ط§طھطŒ ط¢ط®ط± ط§ط³طھط®ط¯ط§ظ…'),
('help_part4', 'ًں“‚ <b>ظ‚ط³ظ… ط§ظ„ظ…ط¬ظ…ظˆط¹ط§طھ</b> (ط§ظ„ظ†ط¸ط§ظ… ط§ظ„ط¬ط¯ظٹط¯) âœ¨\r\n\r\nًں’، <i>ظ†ط¸ط§ظ… ظ…طھط·ظˆط± ظ„طھط¬ظ…ظٹط¹ ط§ظ„ط­ط³ط§ط¨ط§طھ ظˆط±ط¨ط·ظ‡ط§ ط¨ط§ظ„ط¨ظˆطھط§طھ</i>\r\n\r\n<b>ًں“‹ ط¥ط¯ط§ط±ط© ط§ظ„ظ…ط¬ظ…ظˆط¹ط§طھ:</b>\r\n<b>/group_add</b> <code>name</code> - ط¥ظ†ط´ط§ط، ظ…ط¬ظ…ظˆط¹ط© ط¬ط¯ظٹط¯ط©\r\nًں’، <code>/group_add vip</code>\r\n\r\n<b>/group_rename</b> <code>old new</code> - ط¥ط¹ط§ط¯ط© طھط³ظ…ظٹط© ًں†•\r\nًں’، <code>/group_rename vip premium</code>\r\n\r\n<b>/group_delete</b> <code>name confirm</code> - ط­ط°ظپ ظ†ظ‡ط§ط¦ظٹ ًں†•\r\nًں’، <code>/group_delete old confirm</code>\r\n\r\n<b>/group_lock</b> <code>name</code> - ظ‚ظپظ„ (ظ…ظ†ط¹ rename/delete) ًں†•\r\n<b>/group_unlock</b> <code>name</code> - ظپطھط­ ط§ظ„ظ‚ظپظ„ ًں†•\r\n\r\n<b>/groups_list</b> - ط¹ط±ط¶ ط¬ظ…ظٹط¹ ط§ظ„ظ…ط¬ظ…ظˆط¹ط§طھ\r\nًں’، ظٹط¹ط±ط¶ ط§ظ„ظ…ط¬ظ…ظˆط¹ط§طھ ظ…ط¹ ط¹ط¯ط§ط¯ ط§ظ„ط¨ظˆطھط§طھ ظˆط§ظ„ط­ط³ط§ط¨ط§طھ\r\n\r\n<b>/group_details</b> <code>name</code> ًں†•\r\nâ‍،ï¸ڈ ظ…ط¹ظ„ظˆظ…ط§طھ طھظپطµظٹظ„ظٹط©: ط§ظ„ط¨ظˆطھط§طھ + ط§ظ„ط­ط³ط§ط¨ط§طھ (ط¨ط§ظ„ط£ط³ظ…ط§ط، ظˆط§ظ„ط£ط±ظ‚ط§ظ…)\r\nًں’، <code>/group_details default</code>\r\n\r\n<b>/group_info</b> <code>group</code> - طھظپط§طµظٹظ„ ظ…ط¬ظ…ظˆط¹ط©\r\nًں’، <code>/group_info default</code>\r\n\r\n<b>/group_toggle</b> <code>group</code> - طھظپط¹ظٹظ„/طھط¹ط·ظٹظ„\r\nًں’، <code>/group_toggle vip</code>\r\n\r\n<b>/group_usage</b> <code>group</code> - ط¥ط­طµط§ط¦ظٹط§طھ ط§ظ„ط§ط³طھط®ط¯ط§ظ… ًں†•\r\nًں’، <code>/group_usage vip</code>\r\n\r\n<b>ًں¤– ط±ط¨ط· ط§ظ„ط¨ظˆطھط§طھ:</b>\r\n<b>/group_bind</b> <code>bot group</code> - ط±ط¨ط· ط¨ظˆطھ ط¨ظ…ط¬ظ…ظˆط¹ط©\r\nًں’، <code>/group_bind mybot vip</code>\r\n\r\n<b>/group_unbind</b> <code>bot group</code> - ظپظƒ ط±ط¨ط· ط¨ظˆطھ\r\nًں’، <code>/group_unbind mybot vip</code>\r\n\r\n<b>/bot_groups</b> <code>bot</code> - ط¹ط±ط¶ ظ…ط¬ظ…ظˆط¹ط§طھ ظˆط­ط³ط§ط¨ط§طھ ط¨ظˆطھ ًں†•\r\nًں’، <code>/bot_groups mybot</code>\r\n\r\n<b>ًں‘¤ ط¥ط¯ط§ط±ط© ط§ظ„ط­ط³ط§ط¨ط§طھ (ط¯ظپط¹ط§طھ):</b>\r\n<b>/group_account_add</b> <code>group acc1 acc2 ...</code> ًں†•\r\nâ‍،ï¸ڈ ط¥ط¶ط§ظپط© ط­ط³ط§ط¨ط§طھ ظ„ظ…ط¬ظ…ظˆط¹ط© (ط¯ظپط¹ط© ظˆط§ط­ط¯ط©)\r\nًں’، <code>/group_account_add vip acc1 acc2 acc3</code>\r\n\r\n<b>/group_account_del</b> <code>group acc1 acc2 ...</code> ًں†•\r\nâ‍،ï¸ڈ ط¥ط²ط§ظ„ط© ط­ط³ط§ط¨ط§طھ ظ…ظ† ظ…ط¬ظ…ظˆط¹ط© (ط¯ظپط¹ط© ظˆط§ط­ط¯ط©)\r\nًں’، <code>/group_account_del vip acc1 acc2</code>\r\n\r\nâڑ ï¸ڈ <i>ط§ظ„ط¨ظˆطھ ظٹط±ظ‰ ظپظ‚ط· ط§ظ„ط­ط³ط§ط¨ط§طھ ط§ظ„ظ…ظˆط¬ظˆط¯ط© ظپظٹ ظ…ط¬ظ…ظˆط¹ط§طھظ‡</i>'),
('help_part5', 'ًںژ« <b>ظ‚ط³ظ… ط§ظ„ظ‚ط³ط§ط¦ظ…</b> ًں†•\r\n\r\nًں’، <i>ظ„ط²ظٹط§ط¯ط© ط­ط¯ظˆط¯ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ† ط£ظˆ ط¥ط¶ط§ظپط© ط£ظٹط§ظ…</i>\r\n\r\n<b>/generate_voucher</b> <code>type amount [bot] [uses]</code>\r\nâ‍،ï¸ڈ ط¥ظ†ط´ط§ط، ظ‚ط³ظٹظ…ط© ط¬ط¯ظٹط¯ط©\r\n\r\n<b>ط§ظ„ط£ظ†ظˆط§ط¹:</b> users | days\r\n\r\nًں’، <code>/generate_voucher users 100 mybot 1</code>\r\nًں’، <code>/generate_voucher users 50 all 5</code>\r\n\r\n<b>/redeem</b> <code>code [bot]</code> - طھظپط¹ظٹظ„ ظ‚ط³ظٹظ…ط©\r\nًں’، <code>/redeem ABC123 mybot</code>\r\n\r\n<b>/vouchers</b> - ط¹ط±ط¶ ط¬ظ…ظٹط¹ ط§ظ„ظ‚ط³ط§ط¦ظ…\r\n<b>/voucher_search</b> <code>code</code> - ط¨ط­ط« ط¹ظ† ظ‚ط³ظٹظ…ط©\r\n\r\n<b>/voucher_who_used</b> <code>code</code> - طھظ‚ط±ظٹط± ط§ظ„ط§ط³طھط®ط¯ط§ظ… ًں†•\r\nًں’، <code>/voucher_who_used ABC123</code>\r\nâ‍،ï¸ڈ ظٹط¹ط±ط¶ ط§ظ„ط¨ظˆطھط§طھ ط§ظ„طھظٹ ط§ط³طھط®ط¯ظ…طھ ط§ظ„ظ‚ط³ظٹظ…ط© ظ…ط¹ ط§ظ„طھظˆط§ط±ظٹط®\r\n\r\n<b>/voucher_delete</b> <code>code</code> - ط­ط°ظپ ظ‚ط³ظٹظ…ط© ظ†ظ‡ط§ط¦ظٹط§ظ‹ ًں†•\r\nًں’، <code>/voucher_delete ABC123</code>\r\nâڑ ï¸ڈ ظ„ط§ ظٹظ…ظƒظ† ط§ظ„طھط±ط§ط¬ط¹!\r\n\r\n<b>/voucher_stats</b> - ط¥ط­طµط§ط¦ظٹط§طھ ط§ظ„ظ‚ط³ط§ط¦ظ… ًں†•\r\nًں“ٹ ظٹط¹ط±ط¶: ط¥ط¬ظ…ط§ظ„ظٹ ط§ظ„ظ‚ط³ط§ط¦ظ…طŒ ط§ظ„ظ…ط³طھط®ط¯ظ…ط©طŒ ط§ظ„ظ…طھط¨ظ‚ظٹط©طŒ ظ…ط¹ط¯ظ„ ط§ظ„ط§ط³طھط®ط¯ط§ظ…'),
('help_part6', 'ًں“¢ <b>ظ‚ط³ظ… ط§ظ„ط¨ط«</b>\n\n<b>/broadcast</b> <code>label text</code>\nâ‍،ï¸ڈ ط¥ط±ط³ط§ظ„ ط±ط³ط§ظ„ط© ظ„ظ…ط³طھط®ط¯ظ…ظٹ ط¨ظˆطھ ظ…ط¹ظٹظ†\nًں’، <code>/broadcast mybot ظ…ط±ط­ط¨ط§ظ‹ ط¨ظƒظ… ظپظٹ ط§ظ„طھط­ط¯ظٹط« ط§ظ„ط¬ط¯ظٹط¯!</code>\nًں“‌ ظٹظڈط±ط³ظ„ ظ„ط¬ظ…ظٹط¹ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ† ط؛ظٹط± ط§ظ„ظ…ط­ط¸ظˆط±ظٹظ†\n\n<b>/broadcast_all</b> <code>text</code>\nâ‍،ï¸ڈ ط¥ط±ط³ط§ظ„ ط±ط³ط§ظ„ط© ظ„ط¬ظ…ظٹط¹ ظ…ط³طھط®ط¯ظ…ظٹ ظƒظ„ ط§ظ„ط¨ظˆطھط§طھ\nًں’، <code>/broadcast_all ط¥ط´ط¹ط§ط± ط¹ط§ظ… ظ„ظ„ط¬ظ…ظٹط¹</code>\nâڑ ï¸ڈ ظ‚ط¯ ظٹط³طھط؛ط±ظ‚ ظˆظ‚طھط§ظ‹ ط·ظˆظٹظ„ط§ظ‹ ظ…ط¹ ط¹ط¯ط¯ ظƒط¨ظٹط± ظ…ظ† ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ†\n\nâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پâ”پ\n\nًں’¬ <b>ظ‚ط³ظ… ط§ظ„ط±ط¯ظˆط¯</b>\n\n<b>/responses</b>\nâ‍،ï¸ڈ ط¹ط±ط¶ ط¬ظ…ظٹط¹ ظ‚ظˆط§ظ„ط¨ ط§ظ„ط±ط¯ظˆط¯ ط§ظ„ظ…ط¹ط±ظپط©\nًں“‌ ظٹط¹ط±ط¶ ط§ظ„ظ…ظپطھط§ط­ ظˆط§ظ„ظ†طµ (ط£ظˆظ„ 200 ط­ط±ظپ)\n\n<b>/editresponse</b> <code>key text</code>\nâ‍،ï¸ڈ طھط¹ط¯ظٹظ„ ط±ط¯ ظ…ط¹ظٹظ†\nًں’، <code>/editresponse start_1 ظ…ط±ط­ط¨ط§ظ‹ ط¨ظƒ!</code>\nًں“‌ ط§ظ„ظ‚ظˆط§ظ„ط¨ ط§ظ„ظ…طھط§ط­ط©: start_1, code_reply, invalid_account, rate_limited, paused'),
('help_part7', 'ًں’¬ <b>ظ‚ط³ظ… ط§ظ„ط±ط¯ظˆط¯</b> (ظ…ط­ط³ظ‘ظ†) âœ¨\r\n\r\nًں’، <i>ظ†ط¸ط§ظ… ط±ط¯ظˆط¯ ظ…طھظ‚ط¯ظ…: ط¹ط§ظ…ط© ظ„ظƒظ„ ط§ظ„ط¨ظˆطھط§طھ ط£ظˆ ظ…ط®طµطµط© ظ„ط¨ظˆطھ ظˆط§ط­ط¯</i>\r\n\r\n<b>ًں“‹ ط¹ط±ط¶ ط§ظ„ط±ط¯ظˆط¯:</b>\r\n<b>/responses</b> - ط¹ط±ط¶ ط§ظ„ط±ط¯ظˆط¯ ط§ظ„ط¹ط§ظ…ط©\r\n<b>/bot_responses</b> <code>bot</code> - ط±ط¯ظˆط¯ ط¨ظˆطھ ظ…ط®طµطµط© ًں†•\r\nًں’، <code>/bot_responses mybot</code>\r\n\r\n<b>âœڈï¸ڈ طھط¹ط¯ظٹظ„ ط§ظ„ط±ط¯ظˆط¯ ط§ظ„ط¹ط§ظ…ط©:</b>\r\n<b>/edit_global_response</b> <code>key text</code> ًں†•\r\nâ‍،ï¸ڈ ظٹظڈط­ط¯ظ‘ط« ط±ط¯ ط¹ط§ظ… ظ„ط¬ظ…ظٹط¹ ط§ظ„ط¨ظˆطھط§طھ\r\nًں’، <code>/edit_global_response start_1 ظ…ط±ط­ط¨ط§ظ‹!</code>\r\n\r\n<b>/editresponse</b> <code>key text</code>\r\nâ‍،ï¸ڈ ظ†ظپط³ ط§ظ„ط£ظ…ط± ط£ط¹ظ„ط§ظ‡ (ظ‚ط¯ظٹظ…)\r\n\r\n<b>ًں¤– طھط¹ط¯ظٹظ„ ط±ط¯ظˆط¯ ط¨ظˆطھ ظ…ط¹ظٹظ†:</b>\r\n<b>/edit_bot_response</b> <code>bot key text</code> ًں†•\r\nâ‍،ï¸ڈ ط±ط¯ ظ…ط®طµطµ ظ„ط¨ظˆطھ ظˆط§ط­ط¯ ظپظ‚ط·\r\nًں’، <code>/edit_bot_response mybot start_1 ظ…ط±ط­ط¨ط§ظ‹ ظپظٹ ط¨ظˆطھظٹ!</code>\r\n\r\n<b>ًں”§ ط£ظˆط§ظ…ط± ط¥ط¶ط§ظپظٹط©:</b>\r\n<b>/copy_global_to_bot</b> <code>key bot</code> ًں†•\r\nâ‍،ï¸ڈ ظ†ط³ط® ط±ط¯ ط¹ط§ظ… ظ„ظٹطµط¨ط­ ظ…ط®طµطµ ظ„ط¨ظˆطھ\r\n\r\n<b>/delete_bot_response</b> <code>bot key</code> ًں†•\r\nâ‍،ï¸ڈ ط­ط°ظپ ط±ط¯ ظ…ط®طµطµ (ظٹط¹ظˆط¯ ظ„ظ„ط±ط¯ ط§ظ„ط¹ط§ظ…)\r\n\r\n<b>ًں“ڑ ط§ظ„ظ‚ظˆط§ظ„ط¨ ط§ظ„ظ…طھط§ط­ط©:</b>\r\nâ€¢ <code>start_1</code> - ط±ط³ط§ظ„ط© ط§ظ„ط¨ط¯ط§ظٹط©\r\nâ€¢ <code>code_reply</code> - ط±ط¯ ط§ظ„ظƒظˆط¯\r\nâ€¢ <code>invalid_account</code> - ط­ط³ط§ط¨ ط®ط§ط·ط¦\r\nâ€¢ <code>rate_limited</code> - طھط¬ط§ظˆط² ط§ظ„ط­ط¯\r\nâ€¢ <code>paused</code> - ط¨ظˆطھ ظ…طھظˆظ‚ظپ'),
('help_part8', 'ًں‘¨â€چًں’¼ <b>ظ‚ط³ظ… ط§ظ„ظ…ط¯ط±ط§ط، ط§ظ„ظپط±ط¹ظٹظٹظ†</b> ًں†•\n\nظٹظ…ظƒظ†ظƒ ط¥ط¶ط§ظپط© ظ…ط¯ط±ط§ط، ظپط±ط¹ظٹظٹظ† ظ„ظ…ط³ط§ط¹ط¯طھظƒ ظپظٹ ط¥ط¯ط§ط±ط© ط§ظ„ط¨ظˆطھط§طھ ظ…ط¹ طµظ„ط§ط­ظٹط§طھ ظ…ط­ط¯ط¯ط©.\n\nًں“‹ <b>ط£ظˆط§ظ…ط± ط¥ط¯ط§ط±ط© ط§ظ„ظ…ط¯ط±ط§ط،:</b>\n\n<b>/managers_all</b>\nâ‍،ï¸ڈ ط¹ط±ط¶ ط¬ظ…ظٹط¹ ط§ظ„ظ…ط¯ط±ط§ط، ط§ظ„ظپط±ط¹ظٹظٹظ† ظپظٹ ط§ظ„ظ†ط¸ط§ظ…\nًں“ٹ ظٹط¹ط±ط¶: IDطŒ ط§ط³ظ… ط§ظ„ظ…ط³طھط®ط¯ظ…طŒ ط§ظ„ط¨ظˆطھطŒ ط§ظ„طµظ„ط§ط­ظٹط§طھطŒ طھط§ط±ظٹط® ط§ظ„ط¥ط¶ط§ظپط©\n\n<b>/managers</b> <code>label</code>\nâ‍،ï¸ڈ ط¹ط±ط¶ ظ…ط¯ط±ط§ط، ط¨ظˆطھ ظ…ط¹ظٹظ†\nًں’، <code>/managers mybot</code>\n\n<b>/addmanager</b> <code>label user_id [permissions]</code>\nâ‍،ï¸ڈ ط¥ط¶ط§ظپط© ظ…ط¯ظٹط± ظ„ط¨ظˆطھ ظ…ط­ط¯ط¯\nًں’، <code>/addmanager mybot 123456789 1:2:3</code>\nًں’، <code>/addmanager mybot 123456789 all</code>\nًں“‌ ط§ظ„طµظ„ط§ط­ظٹط§طھ ط§ظ„ط§ظپطھط±ط§ط¶ظٹط©: 1:2:3:4:5 (ط¥ط°ط§ ظ„ظ… طھظڈط­ط¯ط¯)\n\n<b>/addmanager_all</b> <code>user_id [permissions]</code>\nâ‍،ï¸ڈ ط¥ط¶ط§ظپط© ظ…ط¯ظٹط± ط¹ط§ظ… ظ„ط¬ظ…ظٹط¹ ط§ظ„ط¨ظˆطھط§طھ\nًں’، <code>/addmanager_all 123456789 all</code>\nًں’، <code>/addmanager_all 123456789 1:2</code>\nâڑ ï¸ڈ ط§ظ„ظ…ط¯ظٹط± ط§ظ„ط¹ط§ظ… ظٹظ…ظ„ظƒ طµظ„ط§ط­ظٹط§طھ ظپظٹ ظƒظ„ ط§ظ„ط¨ظˆطھط§طھ\n\n<b>/removemanager</b> <code>label user_id</code>\nâ‍،ï¸ڈ ط¥ط²ط§ظ„ط© ظ…ط¯ظٹط± ظ…ظ† ط¨ظˆطھ ظ…ط­ط¯ط¯\nًں’، <code>/removemanager mybot 123456789</code>\n\n<b>/removemanager_all</b> <code>user_id</code>\nâ‍،ï¸ڈ ط¥ط²ط§ظ„ط© ظ…ط¯ظٹط± ظ…ظ† ط¬ظ…ظٹط¹ ط§ظ„ط¨ظˆطھط§طھ\nًں’، <code>/removemanager_all 123456789</code>\n\n<b>/managerinfo</b> <code>user_id</code>\nâ‍،ï¸ڈ ط¹ط±ط¶ ظ…ط¹ظ„ظˆظ…ط§طھ ظˆطµظ„ط§ط­ظٹط§طھ ظ…ط¯ظٹط± ظ…ط¹ظٹظ†\nًں’، <code>/managerinfo 123456789</code>\nًں“ٹ ظٹط¹ط±ط¶: ط§ظ„ط¨ظˆطھط§طھ ط§ظ„ظ…ظڈط¯ط§ط±ط©طŒ ط§ظ„طµظ„ط§ط­ظٹط§طھ ظ„ظƒظ„ ط¨ظˆطھطŒ طھط§ط±ظٹط® ط§ظ„ط¥ط¶ط§ظپط©\n\nًں”گ <b>ط§ظ„طµظ„ط§ط­ظٹط§طھ ط§ظ„ظ…طھط§ط­ط©:</b>\n1ï¸ڈâƒ£ = ط¨ط« (Broadcast) - ط¥ط±ط³ط§ظ„ ط±ط³ط§ط¦ظ„ ط¬ظ…ط§ط¹ظٹط©\n2ï¸ڈâƒ£ = ط­ط¸ط± (Ban/Unban) - ط­ط¸ط± ظˆط¥ظ„ط؛ط§ط، ط­ط¸ط± ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ†\n3ï¸ڈâƒ£ = طھط¹ط¨ط¦ط© ظ‚ط³ط§ط¦ظ… (Vouchers) - طھظپط¹ظٹظ„ ط§ظ„ظ‚ط³ط§ط¦ظ…\n4ï¸ڈâƒ£ = ط¹ط±ط¶ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ† - ط§ظ„ظˆطµظˆظ„ ظ„ظ‚ط§ط¦ظ…ط© ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ†\n5ï¸ڈâƒ£ = ط§ظ„ط¨ط­ط« ط¹ظ† ظ…ط³طھط®ط¯ظ… - ط§ظ„ط¨ط­ط« ظˆط§ظ„طھط­ظ‚ظ‚ ظ…ظ† ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ†\n6ï¸ڈâƒ£ = طھط¹ط¯ظٹظ„ ط­ط¯ظˆط¯ ط§ظ„ظ…ط³طھط®ط¯ظ… - طھط؛ظٹظٹط± ط§ظ„ظ…ط­ط§ظˆظ„ط§طھ ط§ظ„ظٹظˆظ…ظٹط©\nâœ¨ = <code>all</code> - ط¬ظ…ظٹط¹ ط§ظ„طµظ„ط§ط­ظٹط§طھ\n\nًں’، <b>ط£ظ…ط«ظ„ط© ط¹ظ„ظ‰ ط§ظ„طµظ„ط§ط­ظٹط§طھ:</b>\nâ€¢ <code>1:2:3</code> = ط¨ط« + ط­ط¸ط± + ظ‚ط³ط§ط¦ظ…\nâ€¢ <code>2:4:5</code> = ط­ط¸ط± + ط¹ط±ط¶ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ† + ط§ظ„ط¨ط­ط«\nâ€¢ <code>all</code> = ظƒظ„ ط§ظ„طµظ„ط§ط­ظٹط§طھ\n\nâڑ ï¸ڈ <b>ظ…ظ„ط§ط­ط¸ط§طھ ظ…ظ‡ظ…ط©:</b>\nâ€¢ ط§ظ„طµظ„ط§ط­ظٹط§طھ طھظڈظپطµظ„ ط¨ظ€ <code>:</code> ط¨ط¯ظˆظ† ظ…ط³ط§ظپط§طھ\nâ€¢ ط§ظ„ظ…ط¯ظٹط± ط§ظ„ط¹ط§ظ… (bot_token=NULL) ظ„ظ‡ طµظ„ط§ط­ظٹط§طھ ظپظٹ ظƒظ„ ط§ظ„ط¨ظˆطھط§طھ\nâ€¢ ظٹظ…ظƒظ† ظ„ظ„ظ…ط¯ظٹط± ط£ظ† ظٹظƒظˆظ† ظپظٹ ط¹ط¯ط© ط¨ظˆطھط§طھ ط¨طµظ„ط§ط­ظٹط§طھ ظ…ط®طھظ„ظپط©\nâ€¢ ط¥ط¶ط§ظپط© ظ…ط¯ظٹط± ظ…ظˆط¬ظˆط¯ طھظڈط­ط¯ظ‘ط« طµظ„ط§ط­ظٹط§طھظ‡ ط¨ط¯ظ„ط§ظ‹ ظ…ظ† ط§ظ„طھظƒط±ط§ط±'),
('help_part9', 'ًںژ¯ <b>ظ†ط¸ط§ظ… ط§ظ„ط­ط¯ظˆط¯ ط§ظ„ط°ظƒظٹ</b> ًں†•âœ¨\r\n\r\nًں’، <i>ظ†ط¸ط§ظ… ظ…طھظ‚ط¯ظ… ظ…ط¹ 3 ط£ظˆط¶ط§ط¹: ظٹظˆظ…ظٹ/ط£ط³ط¨ظˆط¹ظٹ/ط´ظ‡ط±ظٹ</i>\r\n\r\n<b>ًںŒچ ط§ظ„ط­ط¯ظˆط¯ ط§ظ„ط¹ط§ظ…ط©:</b>\r\n<b>/limit_mode_all</b> <code>mode</code>\r\nâ‍،ï¸ڈ طھط؛ظٹظٹط± ط§ظ„ظˆط¶ط¹ ط§ظ„ط¹ط§ظ… (daily/weekly/monthly)\r\nًں’، <code>/limit_mode_all weekly</code>\r\n\r\n<b>/set_daily_all</b> <code>per_day</code>\r\nâ‍،ï¸ڈ طھط¹ظٹظٹظ† ط­ط¯ ظٹظˆظ…ظٹ ط¹ط§ظ…\r\nًں’، <code>/set_daily_all 3</code>\r\n\r\n<b>/set_weekly_all</b> <code>per_day weekly_cap ban_days</code>\r\nâ‍،ï¸ڈ ط­ط¯ ط£ط³ط¨ظˆط¹ظٹ: ظٹظˆظ…ظٹ + ط³ظ‚ظپ ط£ط³ط¨ظˆط¹ظٹ + ظ…ط¯ط© ط­ط¸ط±\r\nًں’، <code>/set_weekly_all 2 6 7</code>\r\n\r\n<b>/set_monthly_all</b> <code>per_day monthly_cap ban_days</code>\r\nâ‍،ï¸ڈ ط­ط¯ ط´ظ‡ط±ظٹ: ظٹظˆظ…ظٹ + ط³ظ‚ظپ ط´ظ‡ط±ظٹ + ظ…ط¯ط© ط­ط¸ط±\r\nًں’، <code>/set_monthly_all 2 20 30</code>\r\n\r\n<b>ًں¤– ط­ط¯ظˆط¯ ط§ظ„ط¨ظˆطھط§طھ (ظ…طھظ‚ط¯ظ…ط©):</b> âœ¨\r\n<b>/limit_mode</b> <code>bot mode</code>\r\nâ‍،ï¸ڈ طھط¹ظٹظٹظ† ظˆط¶ط¹ ط®ط§طµ ظ„ط¨ظˆطھ ظ…ط­ط¯ط¯\r\nًں’، <code>/limit_mode mybot weekly</code>\r\n\r\n<b>/set_daily</b> <code>bot per_day</code> ًں†•\r\nâ‍،ï¸ڈ ط­ط¯ ظٹظˆظ…ظٹ ط¯ظ‚ظٹظ‚ ظ„ط¨ظˆطھ ظ…ط­ط¯ط¯\r\nًں’، <code>/set_daily testbot 1</code>\r\n\r\n<b>/set_weekly</b> <code>bot per_day cap ban</code> ًں†•\r\nâ‍،ï¸ڈ ط­ط¯ ط£ط³ط¨ظˆط¹ظٹ ط¯ظ‚ظٹظ‚ ظ„ط¨ظˆطھ ظ…ط­ط¯ط¯\r\nًں’، <code>/set_weekly vipbot 5 20 3</code>\r\n\r\n<b>/set_monthly</b> <code>bot per_day cap ban</code> ًں†•\r\nâ‍،ï¸ڈ ط­ط¯ ط´ظ‡ط±ظٹ ط¯ظ‚ظٹظ‚ ظ„ط¨ظˆطھ ظ…ط­ط¯ط¯\r\nًں’، <code>/set_monthly premiumbot 10 100 7</code>\r\n\r\n<b>/bot_limit_clear</b> <code>bot</code> ًں†•\r\nâ‍،ï¸ڈ ط­ط°ظپ ط§ظ„ط­ط¯ظˆط¯ ط§ظ„ط®ط§طµط© (ط§ظ„ط¹ظˆط¯ط© ظ„ظ„ط¹ط§ظ…ط©)\r\nًں’، <code>/bot_limit_clear testbot</code>\r\n\r\n<b>ًں‘¤ ط§ظ„طھط¬ط§ظˆط² (ط­ط¯ظˆط¯ ط®ط§طµط©):</b>\r\n<b>/override_account</b> <code>id mode per_day [cap] [ban]</code>\r\nâ‍،ï¸ڈ ط­ط¯ظˆط¯ ظ…ط®طµطµط© ظ„ط­ط³ط§ط¨ ظ…ط­ط¯ط¯ (ط£ط¹ظ„ظ‰ ط£ظˆظ„ظˆظٹط©)\r\nًں’، <code>/override_account 5 weekly 3 10 7</code>\r\n\r\n<b>/override_clear</b> <code>id</code> - ط­ط°ظپ ط§ظ„طھط¬ط§ظˆط²\r\n\r\n<b>ًں“ٹ ط§ظ„ط§ط³طھط¹ظ„ط§ظ… (ظ…ط­ط¯ظ‘ط«):</b> âœ¨\r\n<b>/show_limit</b> <code>target</code>\r\nâ‍،ï¸ڈ ط¹ط±ط¶ ط§ظ„ط­ط¯ظˆط¯ (global/bot/bot/label/account_id)\r\nًں’، <code>/show_limit global</code>\r\nًں’، <code>/show_limit bot</code> - ط¬ظ…ظٹط¹ ط§ظ„ط¨ظˆطھط§طھ ًں†•\r\nًں’، <code>/show_limit bot/vipbot</code> - ط¨ظˆطھ ظ…ط­ط¯ط¯ ًں†•\r\nًں’، <code>/show_limit vipbot</code> - ط¨ظˆطھ ظ…ط­ط¯ط¯\r\nًں’، <code>/show_limit 5</code> - ط­ط³ط§ط¨ ظ…ط­ط¯ط¯\r\n\r\n<b>/reset_counters</b> <code>target</code>\r\nâ‍،ï¸ڈ ط¥ط¹ط§ط¯ط© طھط¹ظٹظٹظ† ط§ظ„ط¹ط¯ط§ط¯ط§طھ (user_id/all)\r\nًں’، <code>/reset_counters 123456789</code>\r\n\r\n<b>â›” ط§ظ„ط­ط¸ط±:</b>\r\n<b>/ban_from_account</b> <code>user_id account_id days</code>\r\nâ‍،ï¸ڈ ط­ط¸ط± ظ…ط³طھط®ط¯ظ… ظ…ظ† ط­ط³ط§ط¨ ظ„ظ…ط¯ط© ظ…ط­ط¯ط¯ط©\r\nًں’، <code>/ban_from_account 123456789 5 7</code>\r\n\r\n<b>/unban_from_account</b> <code>user_id account_id</code>\r\nâ‍،ï¸ڈ ط¥ظ„ط؛ط§ط، ط­ط¸ط± ظ…ط³طھط®ط¯ظ… ظ…ظ† ط­ط³ط§ط¨\r\n\r\n<b>ًں’¬ ط§ظ„ط±ط³ط§ط¦ظ„:</b>\r\n<b>/msg_set</b> <code>event text</code> - طھط®طµظٹطµ ط±ط³ط§ظ„ط©\r\n<b>/msg_show</b> - ط¹ط±ط¶ ط¬ظ…ظٹط¹ ط§ظ„ط±ط³ط§ط¦ظ„\r\n\r\n<b>ًں“‌ ط§ظ„ط£ظˆط¶ط§ط¹:</b>\r\nâ€¢ <b>daily:</b> 2 ظƒظˆط¯/ظٹظˆظ… (ط±ظپط¶ ظپظˆط±ظٹ)\r\nâ€¢ <b>weekly:</b> 2 ظƒظˆط¯/ظٹظˆظ… + 6/ط£ط³ط¨ظˆط¹ (ط­ط¸ط± 7 ط£ظٹط§ظ…)\r\nâ€¢ <b>monthly:</b> 2 ظƒظˆط¯/ظٹظˆظ… + 20/ط´ظ‡ط± (ط­ط¸ط± 30 ظٹظˆظ…)\r\n\r\n<b>ًںژ¯ ط§ظ„ط£ظˆظ„ظˆظٹط©:</b>\r\noverride â†’ bot â†’ global'),
('help_stats', 'ًں“ٹ <b>ظ‚ط³ظ… ط§ظ„ط¥ط­طµط§ط¦ظٹط§طھ</b>\r\n\r\n<b>/stats</b> - ط¥ط­طµط§ط¦ظٹط§طھ ط¹ط§ظ…ط©\r\n<b>/stats</b> <code>label</code> - ط¥ط­طµط§ط¦ظٹط§طھ ط¨ظˆطھ ظ…ط¹ظٹظ†\r\n\r\n<b>ط§ظ„ط¨ظٹط§ظ†ط§طھ:</b>\r\nâ€¢ ط¹ط¯ط¯ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ†\r\nâ€¢ ط¹ط¯ط¯ ط§ظ„ط¨ظˆطھط§طھ\r\nâ€¢ ط¹ط¯ط¯ ط§ظ„ط­ط³ط§ط¨ط§طھ ط§ظ„ظ†ط´ط·ط©\r\nâ€¢ ط¹ط¯ط¯ ط§ظ„ظ…ط¬ظ…ظˆط¹ط§طھ\r\nâ€¢ ط¹ط¯ط¯ ط§ظ„ظ‚ط³ط§ط¦ظ…\r\nâ€¢ ط¥ط¬ظ…ط§ظ„ظٹ ط§ظ„ط£ظƒظˆط§ط¯ ط§ظ„ظ…ط³ط­ظˆط¨ط©'),
('help_system', 'âڑ™ï¸ڈ <b>ظ‚ط³ظ… ط§ظ„طµظٹط§ظ†ط© ظˆط§ظ„ظ†ط¸ط§ظ…</b>\r\n\r\n<b>/system_status</b> - ط­ط§ظ„ط© ط§ظ„ظ†ط¸ط§ظ…\r\n<b>/clear_cache</b> - ظ…ط³ط­ ط§ظ„ط°ط§ظƒط±ط© ط§ظ„ظ…ط¤ظ‚طھط©\r\n<b>/backup_db</b> - ظ†ط³ط® ط§ط­طھظٹط§ط·ظٹ ظ„ظ„ظ‚ط§ط¹ط¯ط©\r\n<b>/system_logs</b> - ط¹ط±ط¶ ط¢ط®ط± 50 ط³ط¬ظ„\r\n\r\nًں’، <i>ط£ظˆط§ظ…ط± ظ…طھظ‚ط¯ظ…ط© ظ„ظ„ظ…ط·ظˆط±ظٹظ† ظپظ‚ط·</i>'),
('invalid_account', 'â‌Œ ط§ط³ظ… ط§ظ„ط­ط³ط§ط¨ ط؛ظٹط± طµط­ظٹط­ ط£ظˆ ط؛ظٹط± ظ…ظپط¹ظ„.'),
('max_users_reached', 'ًںڑ« طھظ… ط§ظ„ظˆطµظˆظ„ ط¥ظ„ظ‰ ط§ظ„ط­ط¯ ط§ظ„ط£ظ‚طµظ‰ ظ„ظ„ظ…ط³طھط®ط¯ظ…ظٹظ† ط§ظ„ظ…ط³ظ…ظˆط­ ظ„ظ‡ظ… ظپظٹ ظ‡ط°ط§ ط§ظ„ط¨ظˆطھ.'),
('not_subscribed', 'ًں”” ظ„ظ„ط­طµظˆظ„ ط¹ظ„ظ‰ ط£ظƒظˆط§ط¯ ط§ظ„طھط­ظ‚ظ‚ ظٹط±ط¬ظ‰ ط§ظ„ط§ط´طھط±ط§ظƒ ظپظٹ ط§ظ„ظ‚ظ†ط§ط© ط£ظˆظ„ط§ظ‹.ًں’™'),
('paused', 'âڈ¸ ط§ظ„ط¨ظˆطھ ظ…طھظˆظ‚ظپ ظ…ط¤ظ‚طھط§ظ‹. ظٹط±ط¬ظ‰ ط§ظ„ظ…ط­ط§ظˆظ„ط© ظ„ط§ط­ظ‚ط§ظ‹.'),
('rate_limited', 'âڈ±ï¸ڈ ظ„ظ‚ط¯ طھط¬ط§ظˆط²طھ ط§ظ„ط­ط¯ ط§ظ„ظٹظˆظ…ظٹ ظ„ظ„ظ…ط­ط§ظˆظ„ط§طھ ظ„ظ‡ط°ط§ ط§ظ„ط­ط³ط§ط¨. ط­ط§ظˆظ„ ط؛ط¯ظ‹ط§.'),
('start_1', 'ًں‘‹ ظ…ط±ط­ط¨ط§ظ‹!'),
('start_2', 'ط£ط±ط³ظ„ ط§ط³ظ… ط§ظ„ط­ط³ط§ط¨ ظ„ظ„ط­طµظˆظ„ ط¹ظ„ظ‰ ط§ظ„ظƒظˆط¯.');

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `steam_accounts`
--

CREATE TABLE `steam_accounts` (
  `id` int(11) NOT NULL,
  `account_name` varchar(64) NOT NULL,
  `shared_secret` varchar(255) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `daily_attempts_override` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- ط§ظ„ظ‚ظˆط§ط¯ط­ `steam_accounts`
--
DELIMITER $$
CREATE TRIGGER `trg_steam_accounts_after_insert` AFTER INSERT ON `steam_accounts` FOR EACH ROW BEGIN
  INSERT IGNORE INTO group_accounts(group_id, account_id)
  SELECT id, NEW.id FROM account_groups WHERE is_default=1;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `steam_requests`
--

CREATE TABLE `steam_requests` (
  `id` bigint(20) NOT NULL,
  `bot_token` varchar(128) NOT NULL,
  `user_id` bigint(20) NOT NULL,
  `account_name` varchar(64) NOT NULL,
  `request_time` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `sub_bots`
--

CREATE TABLE `sub_bots` (
  `id` int(11) NOT NULL,
  `label` varchar(64) NOT NULL,
  `bot_token` varchar(128) NOT NULL,
  `channel_id` varchar(64) DEFAULT NULL,
  `max_users` int(11) NOT NULL DEFAULT 20,
  `daily_attempts` int(11) NOT NULL DEFAULT 5 COMMENT 'ظ…ط¹ط·ظ‘ظ„ - ط§ط³طھط®ط¯ظ… ظ†ط¸ط§ظ… ط§ظ„ط­ط¯ظˆط¯ ط§ظ„ط°ظƒظٹ (limits_global)',
  `welcome_message` text DEFAULT NULL,
  `is_paused` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- ط§ظ„ظ‚ظˆط§ط¯ط­ `sub_bots`
--
DELIMITER $$
CREATE TRIGGER `trg_sub_bots_after_insert` AFTER INSERT ON `sub_bots` FOR EACH ROW BEGIN
  INSERT IGNORE INTO bot_groups(bot_id, group_id)
  SELECT NEW.id, id FROM account_groups WHERE is_default=1;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `system_logs`
--

CREATE TABLE `system_logs` (
  `id` bigint(20) NOT NULL,
  `log_level` enum('INFO','WARNING','ERROR','CRITICAL') DEFAULT 'INFO',
  `component` varchar(64) NOT NULL COMMENT 'control_bot, sub_bot, broadcast',
  `message` text NOT NULL,
  `context` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'ط¨ظٹط§ظ†ط§طھ ط¥ط¶ط§ظپظٹط©' CHECK (json_valid(`context`)),
  `user_id` bigint(20) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط³ط¬ظ„ط§طھ ط§ظ„ظ†ط¸ط§ظ… ظ„ظ„طھط¯ظ‚ظٹظ‚';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `vouchers`
--

CREATE TABLE `vouchers` (
  `id` bigint(20) NOT NULL,
  `code` varchar(32) NOT NULL,
  `voucher_type` enum('users','days','unlimited') DEFAULT 'users',
  `amount` int(11) NOT NULL COMMENT 'ط¹ط¯ط¯ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ† ط£ظˆ ط§ظ„ط£ظٹط§ظ…',
  `target_label` varchar(64) DEFAULT NULL COMMENT 'ط§ط³ظ… ط§ظ„ط¨ظˆطھ ط§ظ„ظ…ط­ط¯ط¯ ط£ظˆ NULL ظ„ظ„ظƒظ„',
  `max_uses` int(11) DEFAULT 1 COMMENT 'ط¹ط¯ط¯ ظ…ط±ط§طھ ط§ظ„ط§ط³طھط®ط¯ط§ظ… ط§ظ„ظ…ط³ظ…ظˆط­',
  `current_uses` int(11) DEFAULT 0 COMMENT 'ط¹ط¯ط¯ ط§ظ„ط§ط³طھط®ط¯ط§ظ…ط§طھ ط§ظ„ط­ط§ظ„ظٹط©',
  `expires_at` timestamp NULL DEFAULT NULL COMMENT 'طھط§ط±ظٹط® ط§ظ†طھظ‡ط§ط، ط§ظ„طµظ„ط§ط­ظٹط©',
  `created_by_user_id` bigint(20) NOT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ظ‚ط³ط§ط¦ظ… ظ„ط²ظٹط§ط¯ط© ط­ط¯ظˆط¯ ط§ظ„ظ…ط³طھط®ط¯ظ…ظٹظ† ط£ظˆ ط§ظ„ط£ظٹط§ظ…';

--
-- ط¥ط±ط¬ط§ط¹ ط£ظˆ ط§ط³طھظٹط±ط§ط¯ ط¨ظٹط§ظ†ط§طھ ط§ظ„ط¬ط¯ظˆظ„ `vouchers`
--

INSERT INTO `vouchers` (`id`, `code`, `voucher_type`, `amount`, `target_label`, `max_uses`, `current_uses`, `expires_at`, `created_by_user_id`, `created_at`) VALUES
(1, 'V7CDC741AB9', 'users', 200, NULL, 5, 5, NULL, 5458195623, '2025-10-22 22:53:04'),
(2, 'VC8B023B368', 'users', 200, NULL, 1, 1, NULL, 5458195623, '2025-10-22 22:55:28'),
(3, 'V41F5ED6080', 'users', 200, NULL, 1, 1, NULL, 5458195623, '2025-10-22 22:58:18'),
(4, 'VDA3EEA5221', 'users', 200, NULL, 1, 0, NULL, 5458195623, '2025-10-22 22:59:04'),
(5, 'V0A744D4400', 'users', 100000, NULL, 1, 1, NULL, 5458195623, '2025-10-23 21:27:09'),
(6, 'V3D412A162D', 'users', 100000, NULL, 1, 1, NULL, 5458195623, '2025-10-24 17:36:20'),
(7, 'V0BD6CE01F0', 'users', 55, '3', 1, 1, NULL, 5458195623, '2025-10-24 17:37:08'),
(8, 'VEAD32AF223', 'users', 55, NULL, 3, 3, NULL, 5458195623, '2025-10-24 17:38:18');

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `voucher_redemptions`
--

CREATE TABLE `voucher_redemptions` (
  `id` bigint(20) NOT NULL,
  `voucher_code` varchar(32) NOT NULL COMMENT 'ط±ظ…ط² ط§ظ„ظ‚ط³ظٹظ…ط©',
  `bot_token` varchar(128) NOT NULL COMMENT 'طھظˆظƒظ† ط§ظ„ط¨ظˆطھ',
  `redeemed_by` bigint(20) NOT NULL COMMENT 'ط§ظ„ظ…ط¯ظٹط± ط§ظ„ط°ظٹ ط§ط³طھط®ط¯ظ… ط§ظ„ظ‚ط³ظٹظ…ط©',
  `amount_added` int(11) DEFAULT 0 COMMENT 'ط§ظ„ظ‚ظٹظ…ط© ط§ظ„ظ…ط¶ط§ظپط©',
  `redeemed_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='ط³ط¬ظ„ ط§ط³طھط®ط¯ط§ظ… ط§ظ„ظ‚ط³ط§ط¦ظ… ظ…ظ† ظ‚ط¨ظ„ ط§ظ„ظ…ط¯ط±ط§ط،';

-- --------------------------------------------------------

--
-- ط¨ظ†ظٹط© ط§ظ„ط¬ط¯ظˆظ„ `voucher_usage`
--

CREATE TABLE `voucher_usage` (
  `id` bigint(20) NOT NULL,
  `voucher_code` varchar(64) NOT NULL,
  `bot_id` int(11) DEFAULT NULL,
  `used_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='طھطھط¨ط¹ ط§ط³طھط®ط¯ط§ظ… ط§ظ„ظ‚ط³ط§ط¦ظ… ظ…ظ† ظ‚ط¨ظ„ ط§ظ„ط¨ظˆطھط§طھ';

--
-- ط¥ط±ط¬ط§ط¹ ط£ظˆ ط§ط³طھظٹط±ط§ط¯ ط¨ظٹط§ظ†ط§طھ ط§ظ„ط¬ط¯ظˆظ„ `voucher_usage`
--

INSERT INTO `voucher_usage` (`id`, `voucher_code`, `bot_id`, `used_at`) VALUES
(1, 'V7CDC741AB9', NULL, '2025-10-22 18:53:28'),
(2, 'V7CDC741AB9', NULL, '2025-10-22 18:54:33'),
(3, 'V7CDC741AB9', NULL, '2025-10-22 18:54:43'),
(4, 'V7CDC741AB9', NULL, '2025-10-22 18:55:12'),
(5, 'V7CDC741AB9', NULL, '2025-10-22 18:55:13'),
(6, 'VC8B023B368', NULL, '2025-10-22 18:55:46'),
(7, 'V41F5ED6080', NULL, '2025-10-22 18:58:26'),
(8, 'V0A744D4400', NULL, '2025-10-23 17:27:24'),
(9, 'V3D412A162D', NULL, '2025-10-24 13:36:37'),
(10, 'V0BD6CE01F0', NULL, '2025-10-24 13:37:24'),
(11, 'VEAD32AF223', NULL, '2025-10-24 13:38:30'),
(12, 'VEAD32AF223', NULL, '2025-10-24 13:38:33'),
(13, 'VEAD32AF223', NULL, '2025-10-24 13:38:35');

--
-- Indexes for dumped tables
--

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `account_groups`
--
ALTER TABLE `account_groups`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `group_name` (`group_name`),
  ADD UNIQUE KEY `idx_unique_group_name_lower` (`group_name_lower`),
  ADD KEY `idx_default` (`is_default`),
  ADD KEY `idx_priority` (`priority`),
  ADD KEY `idx_active` (`active`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `allowed_users`
--
ALTER TABLE `allowed_users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_user_bot` (`bot_token`,`user_id`),
  ADD KEY `idx_bot` (`bot_token`),
  ADD KEY `idx_user` (`user_id`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `bot_groups`
--
ALTER TABLE `bot_groups`
  ADD PRIMARY KEY (`bot_id`,`group_id`),
  ADD KEY `group_id` (`group_id`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `bot_managers`
--
ALTER TABLE `bot_managers`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_manager_bot` (`user_id`,`bot_token`),
  ADD KEY `idx_user` (`user_id`),
  ADD KEY `idx_bot` (`bot_token`),
  ADD KEY `idx_active` (`is_active`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `bot_message_templates`
--
ALTER TABLE `bot_message_templates`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_bot_template` (`bot_id`,`template_key`),
  ADD KEY `idx_bot_id` (`bot_id`),
  ADD KEY `idx_template_key` (`template_key`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `broadcast_jobs`
--
ALTER TABLE `broadcast_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `job_key` (`job_key`),
  ADD KEY `idx_status` (`status`,`scheduled_at`),
  ADD KEY `idx_initiator` (`initiator_user_id`),
  ADD KEY `idx_job_key` (`job_key`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `broadcast_log`
--
ALTER TABLE `broadcast_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_bot_token` (`bot_token`),
  ADD KEY `idx_manager` (`manager_id`),
  ADD KEY `idx_created` (`created_at`),
  ADD KEY `idx_bot_time` (`bot_token`,`created_at`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `control_sessions`
--
ALTER TABLE `control_sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_action` (`action`),
  ADD KEY `idx_user` (`user_id`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `group_accounts`
--
ALTER TABLE `group_accounts`
  ADD PRIMARY KEY (`group_id`,`account_id`),
  ADD KEY `account_id` (`account_id`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `limits_bot`
--
ALTER TABLE `limits_bot`
  ADD PRIMARY KEY (`bot_label`),
  ADD KEY `idx_mode` (`mode`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `limits_global`
--
ALTER TABLE `limits_global`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_mode` (`mode`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `limits_override`
--
ALTER TABLE `limits_override`
  ADD PRIMARY KEY (`account_id`),
  ADD KEY `idx_mode` (`mode`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `limit_bans`
--
ALTER TABLE `limit_bans`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_user_account_bot_ban` (`user_id`,`account_id`,`bot_label`),
  ADD KEY `idx_user` (`user_id`),
  ADD KEY `idx_account` (`account_id`),
  ADD KEY `idx_until` (`banned_until`),
  ADD KEY `idx_active_bans` (`banned_until`,`user_id`),
  ADD KEY `idx_bot_bans` (`bot_label`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `limit_counters`
--
ALTER TABLE `limit_counters`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_user_account_bot` (`user_id`,`account_id`,`bot_label`),
  ADD KEY `idx_user` (`user_id`),
  ADD KEY `idx_account` (`account_id`),
  ADD KEY `idx_day_reset` (`day_reset_at`),
  ADD KEY `idx_week_reset` (`week_reset_at`),
  ADD KEY `idx_month_reset` (`month_reset_at`),
  ADD KEY `idx_user_account_day` (`user_id`,`account_id`,`day_used`),
  ADD KEY `idx_bot_counters` (`bot_label`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `limit_messages`
--
ALTER TABLE `limit_messages`
  ADD PRIMARY KEY (`event`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `message_templates`
--
ALTER TABLE `message_templates`
  ADD PRIMARY KEY (`key`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `steam_accounts`
--
ALTER TABLE `steam_accounts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `account_name` (`account_name`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `steam_requests`
--
ALTER TABLE `steam_requests`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_recent` (`bot_token`,`user_id`,`account_name`,`request_time`),
  ADD KEY `fk_requests_account` (`account_name`),
  ADD KEY `idx_user_requests` (`user_id`,`request_time`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `sub_bots`
--
ALTER TABLE `sub_bots`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `label` (`label`),
  ADD UNIQUE KEY `bot_token` (`bot_token`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `system_logs`
--
ALTER TABLE `system_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_level_time` (`log_level`,`created_at`),
  ADD KEY `idx_component` (`component`),
  ADD KEY `idx_user` (`user_id`),
  ADD KEY `idx_component_time` (`component`,`created_at`),
  ADD KEY `idx_user_time` (`user_id`,`created_at`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `vouchers`
--
ALTER TABLE `vouchers`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`),
  ADD KEY `idx_code` (`code`),
  ADD KEY `idx_type` (`voucher_type`),
  ADD KEY `idx_active` (`current_uses`,`max_uses`),
  ADD KEY `idx_creator` (`created_by_user_id`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `voucher_redemptions`
--
ALTER TABLE `voucher_redemptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_voucher` (`voucher_code`),
  ADD KEY `idx_bot_token` (`bot_token`),
  ADD KEY `idx_redeemed_by` (`redeemed_by`),
  ADD KEY `idx_redeemed_at` (`redeemed_at`),
  ADD KEY `idx_redeemed_by_time` (`redeemed_by`,`redeemed_at`);

--
-- ظپظ‡ط§ط±ط³ ظ„ظ„ط¬ط¯ظˆظ„ `voucher_usage`
--
ALTER TABLE `voucher_usage`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_voucher_code` (`voucher_code`),
  ADD KEY `idx_bot_id` (`bot_id`),
  ADD KEY `idx_used_at` (`used_at`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `account_groups`
--
ALTER TABLE `account_groups`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `allowed_users`
--
ALTER TABLE `allowed_users`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=282;

--
-- AUTO_INCREMENT for table `bot_managers`
--
ALTER TABLE `bot_managers`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `bot_message_templates`
--
ALTER TABLE `bot_message_templates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `broadcast_jobs`
--
ALTER TABLE `broadcast_jobs`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `broadcast_log`
--
ALTER TABLE `broadcast_log`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `control_sessions`
--
ALTER TABLE `control_sessions`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `limits_global`
--
ALTER TABLE `limits_global`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `limit_bans`
--
ALTER TABLE `limit_bans`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `limit_counters`
--
ALTER TABLE `limit_counters`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `steam_accounts`
--
ALTER TABLE `steam_accounts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=111;

--
-- AUTO_INCREMENT for table `steam_requests`
--
ALTER TABLE `steam_requests`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=86;

--
-- AUTO_INCREMENT for table `sub_bots`
--
ALTER TABLE `sub_bots`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;

--
-- AUTO_INCREMENT for table `system_logs`
--
ALTER TABLE `system_logs`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vouchers`
--
ALTER TABLE `vouchers`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `voucher_redemptions`
--
ALTER TABLE `voucher_redemptions`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `voucher_usage`
--
ALTER TABLE `voucher_usage`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

-- --------------------------------------------------------

--
-- Structure for view `active_bans`
--
DROP TABLE IF EXISTS `active_bans`;

CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `active_bans`  AS SELECT `lb`.`id` AS `id`, `lb`.`user_id` AS `user_id`, `lb`.`account_id` AS `account_id`, `lb`.`banned_until` AS `banned_until`, `lb`.`reason` AS `reason`, `lb`.`created_at` AS `created_at`, `sa`.`account_name` AS `account_name`, timestampdiff(HOUR,current_timestamp(),`lb`.`banned_until`) AS `hours_remaining` FROM (`limit_bans` `lb` join `steam_accounts` `sa` on(`sa`.`id` = `lb`.`account_id`)) WHERE `lb`.`banned_until` > current_timestamp() ;

-- --------------------------------------------------------

--
-- Structure for view `current_usage`
--
DROP TABLE IF EXISTS `current_usage`;

CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `current_usage`  AS SELECT `lc`.`id` AS `id`, `lc`.`user_id` AS `user_id`, `lc`.`account_id` AS `account_id`, `lc`.`day_used` AS `day_used`, `lc`.`week_used` AS `week_used`, `lc`.`month_used` AS `month_used`, `lc`.`day_reset_at` AS `day_reset_at`, `lc`.`week_reset_at` AS `week_reset_at`, `lc`.`month_reset_at` AS `month_reset_at`, `lc`.`updated_at` AS `updated_at`, `sa`.`account_name` AS `account_name`, CASE `current_day_used` ELSE `lc`.`day_used` AS `end` END FROM (`limit_counters` `lc` join `steam_accounts` `sa` on(`sa`.`id` = `lc`.`account_id`)) ;

--
-- ط§ظ„ظ‚ظٹظˆط¯ ط§ظ„ظ…ظپط±ظˆط¶ط© ط¹ظ„ظ‰ ط§ظ„ط¬ط¯ط§ظˆظ„ ط§ظ„ظ…ظ„ظ‚ط§ط©
--

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `allowed_users`
--
ALTER TABLE `allowed_users`
  ADD CONSTRAINT `fk_allowed_users_bot` FOREIGN KEY (`bot_token`) REFERENCES `sub_bots` (`bot_token`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `bot_groups`
--
ALTER TABLE `bot_groups`
  ADD CONSTRAINT `bot_groups_ibfk_1` FOREIGN KEY (`bot_id`) REFERENCES `sub_bots` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bot_groups_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `account_groups` (`id`) ON DELETE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `bot_managers`
--
ALTER TABLE `bot_managers`
  ADD CONSTRAINT `fk_manager_bot` FOREIGN KEY (`bot_token`) REFERENCES `sub_bots` (`bot_token`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `bot_message_templates`
--
ALTER TABLE `bot_message_templates`
  ADD CONSTRAINT `bot_message_templates_ibfk_1` FOREIGN KEY (`bot_id`) REFERENCES `sub_bots` (`id`) ON DELETE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `broadcast_log`
--
ALTER TABLE `broadcast_log`
  ADD CONSTRAINT `fk_broadcast_bot` FOREIGN KEY (`bot_token`) REFERENCES `sub_bots` (`bot_token`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `group_accounts`
--
ALTER TABLE `group_accounts`
  ADD CONSTRAINT `group_accounts_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `account_groups` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `group_accounts_ibfk_2` FOREIGN KEY (`account_id`) REFERENCES `steam_accounts` (`id`) ON DELETE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `limits_bot`
--
ALTER TABLE `limits_bot`
  ADD CONSTRAINT `limits_bot_ibfk_1` FOREIGN KEY (`bot_label`) REFERENCES `sub_bots` (`label`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `limits_override`
--
ALTER TABLE `limits_override`
  ADD CONSTRAINT `limits_override_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `steam_accounts` (`id`) ON DELETE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `limit_bans`
--
ALTER TABLE `limit_bans`
  ADD CONSTRAINT `fk_bans_bot_label` FOREIGN KEY (`bot_label`) REFERENCES `sub_bots` (`label`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `limit_bans_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `steam_accounts` (`id`) ON DELETE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `limit_counters`
--
ALTER TABLE `limit_counters`
  ADD CONSTRAINT `fk_counters_bot_label` FOREIGN KEY (`bot_label`) REFERENCES `sub_bots` (`label`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `limit_counters_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `steam_accounts` (`id`) ON DELETE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `steam_requests`
--
ALTER TABLE `steam_requests`
  ADD CONSTRAINT `fk_requests_account` FOREIGN KEY (`account_name`) REFERENCES `steam_accounts` (`account_name`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_requests_bot` FOREIGN KEY (`bot_token`) REFERENCES `sub_bots` (`bot_token`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `voucher_redemptions`
--
ALTER TABLE `voucher_redemptions`
  ADD CONSTRAINT `fk_redemption_bot` FOREIGN KEY (`bot_token`) REFERENCES `sub_bots` (`bot_token`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_redemption_voucher` FOREIGN KEY (`voucher_code`) REFERENCES `vouchers` (`code`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- ظ‚ظٹظˆط¯ ط§ظ„ط¬ط¯ط§ظˆظ„ `voucher_usage`
--
ALTER TABLE `voucher_usage`
  ADD CONSTRAINT `voucher_usage_ibfk_1` FOREIGN KEY (`voucher_code`) REFERENCES `vouchers` (`code`) ON DELETE CASCADE,
  ADD CONSTRAINT `voucher_usage_ibfk_2` FOREIGN KEY (`bot_id`) REFERENCES `sub_bots` (`id`) ON DELETE SET NULL;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;


