2025-09-30 14:18:03,687 - INFO - Loaded environment variables from .env
2025-09-30 14:18:05,084 - INFO - Database connection pool created.
2025-09-30 14:18:05,245 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-09-30 14:18:05,280 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-09-30 14:18:05,420 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-09-30 14:18:05,614 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-09-30 14:18:05,787 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-09-30 14:18:05,830 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-09-30 14:18:05,952 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-09-30 14:18:06,038 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-09-30 14:18:06,189 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-09-30 14:18:06,285 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-09-30 14:18:06,456 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-09-30 14:18:06,491 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-09-30 14:18:06,625 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-09-30 14:18:06,678 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-09-30 14:18:07,024 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-09-30 14:18:07,098 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-09-30 14:18:07,271 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-09-30 14:18:07,317 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-09-30 14:18:07,465 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-09-30 14:18:07,494 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-09-30 14:18:07,501 - WARNING - PyNaCl is not installed, voice will NOT be supported
2025-09-30 14:18:07,505 - INFO - logging in using static token
2025-09-30 14:18:07,515 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://10.5.15.181:8080
2025-09-30 14:18:07,515 - INFO - [33mPress CTRL+C to quit[0m
2025-09-30 14:18:08,000 - INFO - Loaded environment variables from .env
2025-09-30 14:18:09,448 - INFO - Database connection pool created.
2025-09-30 14:18:09,817 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-09-30 14:18:09,882 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-09-30 14:18:10,070 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-09-30 14:18:10,113 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-09-30 14:18:10,239 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-09-30 14:18:10,268 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-09-30 14:18:10,407 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-09-30 14:18:10,436 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-09-30 14:18:10,559 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-09-30 14:18:10,675 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-09-30 14:18:10,804 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-09-30 14:18:10,842 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-09-30 14:18:11,270 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-09-30 14:18:11,303 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-09-30 14:18:11,430 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-09-30 14:18:11,465 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-09-30 14:18:11,587 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-09-30 14:18:11,649 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-09-30 14:18:11,915 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-09-30 14:18:11,943 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-09-30 14:18:11,948 - INFO - Loaded environment variables from .env
2025-09-30 14:18:13,306 - INFO - Database connection pool created.
2025-09-30 14:18:13,448 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-09-30 14:18:13,477 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-09-30 14:18:13,607 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-09-30 14:18:13,637 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-09-30 14:18:14,063 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-09-30 14:18:14,094 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-09-30 14:18:14,307 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-09-30 14:18:14,346 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-09-30 14:18:14,512 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-09-30 14:18:14,541 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-09-30 14:18:14,725 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-09-30 14:18:14,769 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-09-30 14:18:14,913 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-09-30 14:18:14,942 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-09-30 14:18:15,068 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-09-30 14:18:15,129 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-09-30 14:18:15,474 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-09-30 14:18:15,508 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-09-30 14:18:15,633 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-09-30 14:18:15,719 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-09-30 14:18:15,722 - INFO - Loaded environment variables from .env
2025-09-30 14:18:16,813 - INFO - Database connection pool created.
2025-09-30 14:18:16,943 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-09-30 14:18:16,978 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-09-30 14:18:17,133 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-09-30 14:18:17,170 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-09-30 14:18:17,314 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-09-30 14:18:17,392 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-09-30 14:18:17,517 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-09-30 14:18:17,555 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-09-30 14:18:17,776 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-09-30 14:18:17,814 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-09-30 14:18:18,104 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-09-30 14:18:18,139 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-09-30 14:18:18,270 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-09-30 14:18:18,303 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-09-30 14:18:18,430 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-09-30 14:18:18,460 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-09-30 14:18:18,690 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-09-30 14:18:18,745 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-09-30 14:18:18,883 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-09-30 14:18:18,912 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-09-30 14:18:18,914 - INFO - Loaded environment variables from .env
2025-09-30 14:18:20,091 - INFO - Database connection pool created.
2025-09-30 14:18:20,227 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-09-30 14:18:20,256 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-09-30 14:18:20,391 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-09-30 14:18:20,420 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-09-30 14:18:20,827 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-09-30 14:18:20,862 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-09-30 14:18:21,010 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-09-30 14:18:21,039 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-09-30 14:18:21,182 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-09-30 14:18:21,225 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-09-30 14:18:21,428 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-09-30 14:18:21,458 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-09-30 14:18:21,586 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-09-30 14:18:21,619 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-09-30 14:18:21,817 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-09-30 14:18:21,853 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-09-30 14:18:22,255 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-09-30 14:18:22,313 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-09-30 14:18:22,453 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-09-30 14:18:22,483 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-09-30 14:18:22,489 - INFO - Loaded environment variables from .env
2025-09-30 14:18:23,744 - INFO - Database connection pool created.
2025-09-30 14:18:23,894 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-09-30 14:18:23,922 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-09-30 14:18:24,076 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-09-30 14:18:24,135 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-09-30 14:18:24,348 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-09-30 14:18:24,385 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-09-30 14:18:24,511 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-09-30 14:18:24,545 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-09-30 14:18:24,676 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-09-30 14:18:24,999 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-09-30 14:18:25,313 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-09-30 14:18:25,472 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-09-30 14:18:25,772 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-09-30 14:18:25,804 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-09-30 14:18:26,495 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-09-30 14:18:26,821 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-09-30 14:18:27,414 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-09-30 14:18:27,833 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-09-30 14:18:28,078 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-09-30 14:18:28,222 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-09-30 14:18:28,587 - INFO - Loaded environment variables from .env
2025-09-30 14:18:30,776 - INFO - Database connection pool created.
2025-09-30 14:18:31,024 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-09-30 14:18:31,054 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-09-30 14:18:31,182 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-09-30 14:18:31,270 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-09-30 14:18:31,397 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-09-30 14:18:31,438 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-09-30 14:18:31,572 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-09-30 14:18:31,606 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-09-30 14:18:31,899 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-09-30 14:18:32,013 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-09-30 14:18:32,176 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-09-30 14:18:32,205 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-09-30 14:18:32,346 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-09-30 14:18:32,376 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-09-30 14:18:32,540 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-09-30 14:18:32,615 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-09-30 14:18:32,755 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-09-30 14:18:32,784 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-09-30 14:18:32,930 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-09-30 14:18:32,963 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-09-30 14:18:32,972 - INFO - Loaded environment variables from .env
2025-09-30 14:18:34,075 - INFO - Database connection pool created.
2025-09-30 14:18:34,215 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-09-30 14:18:34,245 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-09-30 14:18:34,391 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-09-30 14:18:34,430 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-09-30 14:18:34,553 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-09-30 14:18:34,618 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-09-30 14:18:35,001 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-09-30 14:18:35,029 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-09-30 14:18:35,180 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-09-30 14:18:35,221 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-09-30 14:18:35,344 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-09-30 14:18:35,463 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-09-30 14:18:35,583 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-09-30 14:18:35,616 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-09-30 14:18:35,803 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-09-30 14:18:35,839 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-09-30 14:18:36,302 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-09-30 14:18:36,342 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-09-30 14:18:36,466 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-09-30 14:18:36,548 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-09-30 14:18:36,706 - INFO - Executed query: SELECT * FROM gamble_rooms with params: None
2025-09-30 14:18:36,751 - INFO - Loaded environment variables from .env
2025-09-30 14:18:37,887 - INFO - Database connection pool created.
2025-09-30 14:18:38,008 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-09-30 14:18:38,066 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-09-30 14:18:38,188 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-09-30 14:18:38,217 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-09-30 14:18:38,342 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-09-30 14:18:38,374 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-09-30 14:18:38,506 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-09-30 14:18:38,538 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-09-30 14:18:38,667 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-09-30 14:18:38,740 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-09-30 14:18:39,051 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-09-30 14:18:39,081 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-09-30 14:18:39,226 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-09-30 14:18:39,260 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-09-30 14:18:39,417 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-09-30 14:18:39,454 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-09-30 14:18:39,581 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-09-30 14:18:39,612 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-09-30 14:18:39,748 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-09-30 14:18:39,780 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-09-30 14:18:40,544 - INFO - Shard ID None has connected to Gateway (Session ID: 2cf8595fc79a6732f0d7feaeb03821b6).
2025-09-30 14:18:51,745 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381059068805910728, 601579326714019840, '601579326714019840', 10)
2025-09-30 14:18:51,922 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381286558401040384, 1380335174901960725, '1380335174901960725', 10)
2025-10-01 01:45:26,649 - INFO - Loaded environment variables from .env
2025-10-01 01:45:30,420 - INFO - Database connection pool created.
2025-10-01 01:45:30,953 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 01:45:31,130 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 01:45:31,643 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 01:45:31,708 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 01:45:32,073 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 01:45:32,193 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 01:45:33,231 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 01:45:33,299 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 01:45:33,864 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 01:45:33,997 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 01:45:35,084 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 01:45:35,204 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 01:45:35,802 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 01:45:35,866 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 01:45:36,232 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 01:45:36,366 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 01:45:36,947 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 01:45:37,090 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 01:45:37,400 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 01:45:37,478 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 01:45:37,491 - WARNING - PyNaCl is not installed, voice will NOT be supported
2025-10-01 01:45:37,492 - INFO - logging in using static token
2025-10-01 01:45:37,507 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://10.2.71.58:8080
2025-10-01 01:45:37,508 - INFO - [33mPress CTRL+C to quit[0m
2025-10-01 01:45:38,041 - INFO - Loaded environment variables from .env
2025-10-01 01:45:41,471 - INFO - Database connection pool created.
2025-10-01 01:45:42,251 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 01:45:42,394 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 01:45:43,282 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 01:45:43,470 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 01:45:44,151 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 01:45:44,221 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 01:45:44,645 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 01:45:44,740 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 01:45:45,559 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 01:45:45,632 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 01:45:45,917 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 01:45:46,030 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 01:45:46,589 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 01:45:46,795 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 01:45:47,820 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 01:45:47,944 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 01:45:48,408 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 01:45:48,448 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 01:45:49,008 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 01:45:49,318 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 01:45:49,323 - INFO - Loaded environment variables from .env
2025-10-01 01:45:53,354 - INFO - Database connection pool created.
2025-10-01 01:45:53,874 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 01:45:53,914 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 01:45:54,256 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 01:45:54,399 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 01:45:55,062 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 01:45:55,157 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 01:45:55,297 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 01:45:55,473 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 01:45:56,073 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 01:45:56,219 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 01:45:56,593 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 01:45:56,638 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 01:45:57,358 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 01:45:57,512 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 01:45:58,233 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 01:45:58,360 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 01:45:58,866 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 01:45:58,987 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 01:45:59,328 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 01:45:59,394 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 01:45:59,396 - INFO - Loaded environment variables from .env
2025-10-01 01:46:02,111 - INFO - Database connection pool created.
2025-10-01 01:46:02,502 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 01:46:02,574 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 01:46:02,949 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 01:46:03,070 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 01:46:03,360 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 01:46:03,406 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:00:23,974 - INFO - Loaded environment variables from .env
2025-10-01 11:00:25,400 - INFO - Database connection pool created.
2025-10-01 11:00:25,830 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:00:25,873 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:00:26,023 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:00:26,068 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:00:27,165 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:00:27,247 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:00:27,695 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:00:27,731 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:00:28,971 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:00:29,017 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:00:29,200 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:00:29,235 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:00:29,382 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:00:29,417 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:00:30,037 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:00:30,071 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:00:30,261 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:00:30,303 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:00:30,448 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:00:30,496 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:00:30,508 - WARNING - PyNaCl is not installed, voice will NOT be supported
2025-10-01 11:00:30,509 - INFO - logging in using static token
2025-10-01 11:00:30,529 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://10.5.15.181:8080
2025-10-01 11:00:30,529 - INFO - [33mPress CTRL+C to quit[0m
2025-10-01 11:00:31,239 - INFO - Loaded environment variables from .env
2025-10-01 11:00:32,724 - INFO - Database connection pool created.
2025-10-01 11:00:32,895 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:00:32,943 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:00:33,157 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:00:33,244 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:00:33,389 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:00:33,432 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:00:33,622 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:00:33,660 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:00:33,820 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:00:33,964 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:00:34,241 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:00:34,284 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:00:34,515 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:00:34,553 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:00:34,971 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:00:35,036 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:00:35,177 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:00:35,218 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:00:35,628 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:00:35,680 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:00:35,695 - INFO - Loaded environment variables from .env
2025-10-01 11:00:36,694 - INFO - Database connection pool created.
2025-10-01 11:00:37,056 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:00:37,094 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:00:37,257 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:00:37,291 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:00:37,446 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:00:37,484 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:00:37,639 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:00:37,679 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:00:37,854 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:00:37,888 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:00:38,025 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:00:38,055 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:00:38,374 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:00:38,403 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:00:38,576 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:00:38,617 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:00:38,803 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:00:38,842 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:00:38,990 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:00:39,022 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:00:39,034 - INFO - Loaded environment variables from .env
2025-10-01 11:00:40,180 - INFO - Database connection pool created.
2025-10-01 11:00:40,375 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:00:40,410 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:00:40,564 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:00:40,600 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:00:40,746 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:00:40,779 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:00:41,125 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:00:41,182 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:00:41,346 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:00:41,377 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:00:41,520 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:00:41,553 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:00:41,705 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:00:41,744 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:00:41,909 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:00:41,942 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:00:42,109 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:00:42,152 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:00:42,553 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:00:42,600 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:00:42,606 - INFO - Loaded environment variables from .env
2025-10-01 11:00:44,235 - INFO - Database connection pool created.
2025-10-01 11:00:44,387 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:00:44,431 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:00:44,590 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:00:44,624 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:00:44,761 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:00:44,794 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:00:44,956 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:00:44,986 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:00:45,346 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:00:45,395 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:00:45,549 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:00:45,584 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:00:45,774 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:00:45,807 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:00:45,950 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:00:45,988 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:00:46,136 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:00:46,175 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:00:46,328 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:00:46,360 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:00:46,366 - INFO - Loaded environment variables from .env
2025-10-01 11:00:47,558 - INFO - Database connection pool created.
2025-10-01 11:00:47,698 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:00:47,747 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:00:48,091 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:00:48,172 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:00:48,334 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:00:48,371 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:00:48,555 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:00:48,586 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:00:48,736 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:00:48,766 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:00:48,963 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:00:48,997 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:00:49,143 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:00:49,176 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:00:49,320 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:00:49,504 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:00:49,657 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:00:49,688 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:00:49,836 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:00:49,867 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:00:50,267 - INFO - Loaded environment variables from .env
2025-10-01 11:00:51,459 - INFO - Database connection pool created.
2025-10-01 11:00:51,623 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:00:51,669 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:00:51,851 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:00:51,890 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:00:52,024 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:00:52,296 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:00:52,481 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:00:52,517 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:00:52,678 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:00:52,716 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:00:52,878 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:00:52,920 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:00:53,091 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:00:53,124 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:00:53,273 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:00:53,310 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:00:53,452 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:00:53,525 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:00:53,817 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:00:53,852 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:00:53,867 - INFO - Loaded environment variables from .env
2025-10-01 11:00:55,108 - INFO - Database connection pool created.
2025-10-01 11:00:55,287 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:00:55,333 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:00:55,519 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:00:55,559 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:00:55,706 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:00:55,738 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:00:55,885 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:00:55,916 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:00:56,086 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:00:56,125 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:00:56,494 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:00:56,557 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:00:56,717 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:00:56,761 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:00:56,941 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:00:56,990 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:00:57,170 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:00:57,210 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:00:57,373 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:00:57,408 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:00:58,266 - INFO - Executed query: SELECT * FROM gamble_rooms with params: None
2025-10-01 11:00:58,308 - INFO - Loaded environment variables from .env
2025-10-01 11:00:59,497 - INFO - Database connection pool created.
2025-10-01 11:00:59,650 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:00:59,681 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:00:59,825 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:00:59,857 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:01:00,032 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:01:00,075 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:01:00,211 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:01:00,250 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:01:00,403 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:01:00,731 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:01:00,938 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:01:00,966 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:01:01,149 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:01:01,226 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:01:01,415 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:01:01,460 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:01:01,635 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:01:01,684 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:01:01,841 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:01:01,873 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:01:02,905 - INFO - Shard ID None has connected to Gateway (Session ID: d0562781e9a275b345fecc7f040ad718).
2025-10-01 11:02:49,956 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-10-01 11:02:50,192 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 11:02:50,574 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:02:50,605 - INFO - XP: 348, Level: 3
2025-10-01 11:02:51,194 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 356, 3, 356, 3)
2025-10-01 11:05:15,377 - INFO - Loaded environment variables from .env
2025-10-01 11:05:22,342 - INFO - Database connection pool created.
2025-10-01 11:05:23,513 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:05:23,775 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:05:24,787 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:05:25,039 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:05:26,160 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:05:26,414 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:05:27,419 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:05:27,665 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:05:28,688 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:05:28,939 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:05:29,989 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:05:30,238 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:05:31,480 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:05:31,725 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:05:32,846 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:05:33,097 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:05:34,311 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:05:34,598 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:05:35,617 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:05:35,875 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:05:35,883 - INFO - Loaded environment variables from .env
2025-10-01 11:05:42,427 - INFO - Database connection pool created.
2025-10-01 11:05:43,823 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:05:44,077 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:05:45,138 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:05:45,620 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:05:46,698 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:05:46,957 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:05:48,215 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:05:48,388 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:05:48,519 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:05:48,551 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:05:48,705 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:05:48,742 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:05:48,926 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:05:48,956 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:05:49,386 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:05:49,423 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:05:49,589 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:05:49,641 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:05:49,824 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:05:49,872 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:05:50,041 - INFO - Loaded environment variables from .env
2025-10-01 11:05:51,262 - INFO - Database connection pool created.
2025-10-01 11:05:51,430 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:05:51,467 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:05:51,630 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:05:51,673 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:05:52,135 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:05:52,168 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:05:52,310 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:05:52,342 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:05:52,481 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:05:52,525 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:05:52,663 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:05:52,702 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:05:52,839 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:05:52,879 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:05:53,017 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:05:53,047 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:05:53,186 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:05:53,218 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:05:53,604 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:05:53,651 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:05:53,659 - INFO - Loaded environment variables from .env
2025-10-01 11:05:54,951 - INFO - Database connection pool created.
2025-10-01 11:05:55,213 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:05:55,250 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:05:55,392 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:05:55,429 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:05:55,608 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:05:55,642 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:05:55,786 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:05:55,820 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:05:55,967 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:05:56,001 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:05:56,435 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:05:56,463 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:05:56,588 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:05:56,625 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:05:56,771 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:05:56,813 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:05:56,956 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:05:56,992 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:05:57,159 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:05:57,189 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:05:57,203 - INFO - Loaded environment variables from .env
2025-10-01 11:05:58,491 - INFO - Database connection pool created.
2025-10-01 11:05:58,638 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:05:58,673 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:05:58,833 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:05:58,878 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:05:59,282 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:05:59,326 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:05:59,523 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:05:59,553 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:05:59,693 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:05:59,726 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:05:59,883 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:05:59,917 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:06:00,062 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:06:00,092 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:06:00,247 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:06:00,417 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:06:00,652 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:06:00,692 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:06:00,914 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:06:00,952 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:06:01,105 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381059068805910728, 601579326714019840, '601579326714019840', 10)
2025-10-01 11:06:01,363 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381286558401040384, 1380335174901960725, '1380335174901960725', 10)
2025-10-01 11:06:01,433 - INFO - Loaded environment variables from .env
2025-10-01 11:06:01,463 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/admin.py", line 110, in _reload
    await reload_all(self.client, ctx)
  File "/Users/niels/Documents/DiscordBot/cogs/admin.py", line 20, in reload_all
    await client.reload_extension(f"cogs.{filename[:-3]}")
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1133, in reload_extension
    await self.load_extension(name)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1029, in load_extension
    await self._load_from_module_spec(spec, name)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 963, in _load_from_module_spec
    await setup(self)
  File "/Users/niels/Documents/DiscordBot/cogs/gamble.py", line 979, in setup
    await client.add_cog(Gamble(client))
  File "/Users/niels/Documents/DiscordBot/cogs/gamble.py", line 312, in __init__
    self.db = DatabaseManager()
  File "/Users/niels/Documents/DiscordBot/utils/sql_commands.py", line 35, in __init__
    self.pool = pooling.MySQLConnectionPool(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/mysql/connector/pooling.py", line 159, in __init__
    self.add_connection()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/mysql/connector/pooling.py", line 270, in add_connection
    cnx = MySQLConnection(**self._cnx_config)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/mysql/connector/connection.py", line 95, in __init__
    self.connect(**kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/mysql/connector/abstracts.py", line 716, in connect
    self._open_connection()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/mysql/connector/connection.py", line 206, in _open_connection
    self._socket.open_connection()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/mysql/connector/network.py", line 509, in open_connection
    self.sock.connect(sockaddr)

2025-10-01 11:06:02,590 - INFO - Database connection pool created.
2025-10-01 11:06:02,731 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:06:02,775 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:06:02,904 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:06:02,946 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:06:03,284 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:06:03,363 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:06:03,510 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:06:03,578 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:06:03,709 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:06:03,740 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:06:03,872 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:06:03,920 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:06:04,077 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:06:04,111 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:06:04,247 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:06:04,285 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:06:04,428 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:06:04,470 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:06:04,897 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:06:04,941 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:06:05,076 - INFO - Executed query: SELECT * FROM gamble_rooms with params: None
2025-10-01 11:06:05,113 - INFO - Loaded environment variables from .env
2025-10-01 11:06:06,198 - INFO - Database connection pool created.
2025-10-01 11:06:06,348 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:06:06,383 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:06:06,527 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:06:06,562 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:06:06,702 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:06:06,735 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:06:06,870 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:06:06,914 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:06:07,061 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:06:07,103 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:06:07,265 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:06:07,303 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:06:07,634 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:06:07,672 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:06:07,800 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:06:07,833 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:06:07,984 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:06:08,026 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:06:08,178 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:06:08,220 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:06:08,362 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 11:06:08,547 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:06:08,587 - INFO - XP: 356, Level: 3
2025-10-01 11:06:09,121 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 367, 3, 367, 3)
2025-10-01 11:06:09,520 - ERROR - Attempting a reconnect in 0.23s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 667, in connect
    await self.ws.poll_event()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 625, in poll_event
    await self.received_message(msg.data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 533, in received_message
    await self.send_as_json(beat)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 661, in send_as_json
    await self.send(utils._to_json(data))
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 657, in send
    await self.socket.send_str(data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client_ws.py", line 226, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 750, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 690, in _send_frame
    self._write(header + mask + message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 723, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
2025-10-01 11:06:09,718 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-10-01 11:06:09,942 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 11:06:10,158 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:06:10,192 - INFO - XP: 367, Level: 3
2025-10-01 11:06:10,605 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 376, 3, 376, 3)
2025-10-01 11:06:11,140 - INFO - Shard ID None has successfully RESUMED session d0562781e9a275b345fecc7f040ad718.
2025-10-01 11:06:14,578 - INFO - Executed query: SELECT COMMANDNAME, RESPONSE FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-10-01 11:06:14,784 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 11:06:15,047 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:06:15,082 - INFO - XP: 376, Level: 3
2025-10-01 11:06:15,225 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 384, 3, 384, 3)
2025-10-01 11:06:19,227 - WARNING - Could not DM owner of App Repo about missing permissions.
2025-10-01 11:06:23,200 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 11:06:23,365 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:06:23,403 - INFO - XP: 384, Level: 3
2025-10-01 11:06:23,553 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 394, 3, 394, 3)
2025-10-01 11:06:43,350 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 11:06:43,562 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:06:43,599 - INFO - XP: 394, Level: 3
2025-10-01 11:06:44,429 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 407, 3, 407, 3)
2025-10-01 11:07:02,235 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 59, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 27, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 11:07:12,238 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 59, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 27, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 11:07:13,855 - ERROR - Attempting a reconnect in 0.19s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 667, in connect
    await self.ws.poll_event()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 625, in poll_event
    await self.received_message(msg.data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 533, in received_message
    await self.send_as_json(beat)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 661, in send_as_json
    await self.send(utils._to_json(data))
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 657, in send
    await self.socket.send_str(data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client_ws.py", line 226, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 750, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 690, in _send_frame
    self._write(header + mask + message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 723, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
2025-10-01 11:07:14,401 - INFO - Shard ID None has successfully RESUMED session d0562781e9a275b345fecc7f040ad718.
2025-10-01 11:12:53,890 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381059068805910728, 601579326714019840, '601579326714019840', 10)
2025-10-01 11:12:54,075 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381286558401040384, 1380335174901960725, '1380335174901960725', 10)
2025-10-01 11:12:57,946 - INFO - Loaded environment variables from .env
2025-10-01 11:12:58,780 - INFO - Database connection pool created.
2025-10-01 11:12:58,923 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:12:58,953 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:12:59,095 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:12:59,127 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:12:59,480 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:12:59,521 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:12:59,668 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:12:59,698 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:12:59,836 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:12:59,869 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:12:59,996 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:13:00,032 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:13:00,157 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:13:00,189 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:13:00,323 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:13:00,353 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:13:00,485 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:13:00,517 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:13:00,854 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:13:00,896 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:13:00,901 - WARNING - PyNaCl is not installed, voice will NOT be supported
2025-10-01 11:13:00,901 - INFO - logging in using static token
2025-10-01 11:13:00,912 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://10.5.15.181:8080
2025-10-01 11:13:00,912 - INFO - [33mPress CTRL+C to quit[0m
2025-10-01 11:13:01,559 - INFO - Loaded environment variables from .env
2025-10-01 11:13:02,672 - INFO - Database connection pool created.
2025-10-01 11:13:02,806 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:13:02,837 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:13:02,998 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:13:03,029 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:13:03,159 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:13:03,190 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:13:03,570 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:13:03,606 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:13:03,743 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:13:03,778 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:13:03,967 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:13:04,000 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:13:04,133 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:13:04,167 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:13:04,316 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:13:04,347 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:13:04,469 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:13:04,500 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:13:04,630 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:13:04,660 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:13:04,664 - INFO - Loaded environment variables from .env
2025-10-01 11:13:05,693 - INFO - Database connection pool created.
2025-10-01 11:13:05,830 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:13:05,862 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:13:05,998 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:13:06,031 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:13:06,407 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:13:06,441 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:13:06,579 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:13:06,613 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:13:06,760 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:13:06,792 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:13:06,927 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:13:06,966 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:13:07,108 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:13:07,152 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:13:07,280 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:13:07,315 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:13:07,471 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:13:07,507 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:13:07,874 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:13:07,920 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:13:07,942 - INFO - Loaded environment variables from .env
2025-10-01 11:13:08,877 - INFO - Database connection pool created.
2025-10-01 11:13:09,329 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:13:09,363 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:13:09,521 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:13:09,552 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:13:09,700 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:13:09,731 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:13:09,868 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:13:09,901 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:13:10,028 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:13:10,060 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:13:10,192 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:13:10,224 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:13:10,357 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:13:10,389 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:13:10,735 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:13:10,768 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:13:10,895 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:13:10,927 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:13:11,054 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:13:11,087 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:13:11,090 - INFO - Loaded environment variables from .env
2025-10-01 11:13:12,185 - INFO - Database connection pool created.
2025-10-01 11:13:12,321 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:13:12,354 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:13:12,484 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:13:12,517 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:13:12,668 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:13:12,706 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:13:12,833 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:13:12,867 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:13:13,012 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:13:13,044 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:13:13,510 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:13:13,544 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:13:13,676 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:13:13,708 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:13:13,828 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:13:13,864 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:13:13,990 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:13:14,023 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:13:14,175 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:13:14,207 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:13:14,215 - INFO - Loaded environment variables from .env
2025-10-01 11:13:15,323 - INFO - Database connection pool created.
2025-10-01 11:13:15,473 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:13:15,519 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:13:15,677 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:13:15,724 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:13:15,874 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:13:15,908 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:13:16,276 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:13:16,316 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:13:16,448 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:13:16,483 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:13:16,612 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:13:16,642 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:13:16,774 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:13:16,812 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:13:16,952 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:13:16,991 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:13:17,138 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:13:17,168 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:13:17,314 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:13:17,354 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:13:17,412 - INFO - Loaded environment variables from .env
2025-10-01 11:13:18,540 - INFO - Database connection pool created.
2025-10-01 11:13:18,683 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:13:18,718 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:13:18,853 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:13:19,114 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:13:19,243 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:13:19,277 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:13:19,416 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:13:19,448 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:13:19,577 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:13:19,612 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:13:19,738 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:13:19,770 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:13:19,908 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:13:19,941 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:13:20,074 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:13:20,119 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:13:20,389 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:13:20,481 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:13:20,615 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:13:20,647 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:13:20,660 - INFO - Loaded environment variables from .env
2025-10-01 11:13:21,558 - INFO - Database connection pool created.
2025-10-01 11:13:21,942 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:13:21,974 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:13:22,105 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:13:22,139 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:13:22,281 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:13:22,313 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:13:22,446 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:13:22,480 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:13:22,611 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:13:22,645 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:13:22,786 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:13:22,818 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:13:22,958 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:13:23,273 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:13:23,415 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:13:23,444 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:13:23,571 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:13:23,602 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:13:23,766 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:13:23,800 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:13:23,927 - INFO - Executed query: SELECT * FROM gamble_rooms with params: None
2025-10-01 11:13:23,964 - INFO - Loaded environment variables from .env
2025-10-01 11:13:25,071 - INFO - Database connection pool created.
2025-10-01 11:13:25,202 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 11:13:25,241 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 11:13:25,473 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 11:13:25,510 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 11:13:25,642 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 11:13:25,674 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 11:13:26,052 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 11:13:26,085 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 11:13:26,228 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 11:13:26,262 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 11:13:26,394 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 11:13:26,433 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 11:13:26,560 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 11:13:26,592 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 11:13:26,720 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 11:13:26,753 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 11:13:26,894 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 11:13:26,927 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 11:13:27,081 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 11:13:27,115 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 11:13:28,161 - INFO - Shard ID None has connected to Gateway (Session ID: f7063c017aef67c34df5543b119a13cc).
2025-10-01 11:13:38,963 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-10-01 11:13:39,141 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 11:13:39,310 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:13:39,345 - INFO - XP: 407, Level: 3
2025-10-01 11:13:39,475 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 417, 3, 417, 3)
2025-10-01 11:17:21,523 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 11:17:21,716 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:17:21,757 - INFO - XP: 417, Level: 3
2025-10-01 11:17:22,032 - INFO - Executed query: SELECT BANK FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:17:22,238 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:17:22,430 - INFO - Executed query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK) with params: (601579326714019840, 4610, 667)
2025-10-01 11:17:22,896 - INFO - Insert completed with query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK).
2025-10-01 11:17:33,410 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 0, 4, 0, 4)
2025-10-01 11:17:47,800 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:17:47,992 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 11:17:48,162 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 11:17:48,199 - INFO - XP: 0, Level: 4
2025-10-01 11:17:48,402 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 7, 4, 7, 4)
2025-10-01 11:37:31,270 - INFO - Shard ID None session has been invalidated.
2025-10-01 11:37:37,072 - INFO - Shard ID None has connected to Gateway (Session ID: 9b176fbcf69aa7ebe90efa245bed6d9b).
2025-10-01 11:41:01,057 - ERROR - Attempting a reconnect in 0.56s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1091, in _wrap_create_connection
    sock = await aiohappyeyeballs.start_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection
    raise first_exception
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection
    sock = await _connect_sock(
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock
    await loop.sock_connect(sock, address)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 651, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 659, in _sock_connect
    sock.connect(address)
OSError: [Errno 51] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 664, in connect
    self.ws = await asyncio.wait_for(coro, timeout=60.0)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 374, in from_client
    socket = await client.http.ws_connect(str(url))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 550, in ws_connect
    return await self.__session.ws_connect(url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 937, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 663, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 563, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1032, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1366, in _create_direct_connection
    raise last_exc
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1335, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1106, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host gateway-us-east1-c.discord.gg:443 ssl:default [Network is unreachable]
2025-10-01 11:41:01,645 - ERROR - Attempting a reconnect in 1.89s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1091, in _wrap_create_connection
    sock = await aiohappyeyeballs.start_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection
    raise first_exception
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection
    sock = await _connect_sock(
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock
    await loop.sock_connect(sock, address)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 651, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 659, in _sock_connect
    sock.connect(address)
OSError: [Errno 51] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 664, in connect
    self.ws = await asyncio.wait_for(coro, timeout=60.0)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 374, in from_client
    socket = await client.http.ws_connect(str(url))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 550, in ws_connect
    return await self.__session.ws_connect(url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 937, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 663, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 563, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1032, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1366, in _create_direct_connection
    raise last_exc
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1335, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1106, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host gateway-us-east1-c.discord.gg:443 ssl:default [Network is unreachable]
2025-10-01 11:41:03,550 - ERROR - Attempting a reconnect in 0.72s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1091, in _wrap_create_connection
    sock = await aiohappyeyeballs.start_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection
    raise first_exception
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection
    sock = await _connect_sock(
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock
    await loop.sock_connect(sock, address)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 651, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 659, in _sock_connect
    sock.connect(address)
OSError: [Errno 51] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 664, in connect
    self.ws = await asyncio.wait_for(coro, timeout=60.0)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 374, in from_client
    socket = await client.http.ws_connect(str(url))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 550, in ws_connect
    return await self.__session.ws_connect(url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 937, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 663, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 563, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1032, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1366, in _create_direct_connection
    raise last_exc
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1335, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1106, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host gateway-us-east1-c.discord.gg:443 ssl:default [Network is unreachable]
2025-10-01 11:41:04,281 - ERROR - Attempting a reconnect in 5.89s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1091, in _wrap_create_connection
    sock = await aiohappyeyeballs.start_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection
    raise first_exception
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection
    sock = await _connect_sock(
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock
    await loop.sock_connect(sock, address)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 651, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 659, in _sock_connect
    sock.connect(address)
OSError: [Errno 51] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 664, in connect
    self.ws = await asyncio.wait_for(coro, timeout=60.0)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 374, in from_client
    socket = await client.http.ws_connect(str(url))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 550, in ws_connect
    return await self.__session.ws_connect(url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 937, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 663, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 563, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1032, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1366, in _create_direct_connection
    raise last_exc
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1335, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1106, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host gateway-us-east1-c.discord.gg:443 ssl:default [Network is unreachable]
2025-10-01 11:41:10,190 - ERROR - Attempting a reconnect in 16.16s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1091, in _wrap_create_connection
    sock = await aiohappyeyeballs.start_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection
    raise first_exception
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection
    sock = await _connect_sock(
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock
    await loop.sock_connect(sock, address)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 651, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 659, in _sock_connect
    sock.connect(address)
OSError: [Errno 51] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 664, in connect
    self.ws = await asyncio.wait_for(coro, timeout=60.0)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 374, in from_client
    socket = await client.http.ws_connect(str(url))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 550, in ws_connect
    return await self.__session.ws_connect(url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 937, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 663, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 563, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1032, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1366, in _create_direct_connection
    raise last_exc
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1335, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1106, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host gateway-us-east1-c.discord.gg:443 ssl:default [Network is unreachable]
2025-10-01 11:56:28,578 - ERROR - Attempting a reconnect in 36.97s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1091, in _wrap_create_connection
    sock = await aiohappyeyeballs.start_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 104, in start_connection
    raise first_exception
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 82, in start_connection
    sock = await _connect_sock(
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohappyeyeballs/impl.py", line 174, in _connect_sock
    await loop.sock_connect(sock, address)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 651, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/selector_events.py", line 659, in _sock_connect
    sock.connect(address)
OSError: [Errno 51] Network is unreachable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 664, in connect
    self.ws = await asyncio.wait_for(coro, timeout=60.0)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 374, in from_client
    socket = await client.http.ws_connect(str(url))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 550, in ws_connect
    return await self.__session.ws_connect(url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 937, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 663, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 563, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1032, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1366, in _create_direct_connection
    raise last_exc
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1335, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1106, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host gateway-us-east1-c.discord.gg:443 ssl:default [Network is unreachable]
2025-10-01 11:57:05,995 - INFO - Shard ID None session has been invalidated.
2025-10-01 11:57:12,061 - INFO - Shard ID None has connected to Gateway (Session ID: fc571cb91f5b45e9884f2fb4d627b054).
2025-10-01 12:19:56,322 - ERROR - Attempting a reconnect in 75.25s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1317, in _create_direct_connection
    hosts = await self._resolve_host(host, port, traces=traces)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 971, in _resolve_host
    return await asyncio.shield(resolved_host_task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1002, in _resolve_host_with_throttle
    addrs = await self._resolver.resolve(host, port, family=self._family)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/resolver.py", line 38, in resolve
    infos = await self._loop.getaddrinfo(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 905, in getaddrinfo
    return await self.run_in_executor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 978, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 664, in connect
    self.ws = await asyncio.wait_for(coro, timeout=60.0)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 374, in from_client
    socket = await client.http.ws_connect(str(url))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 550, in ws_connect
    return await self.__session.ws_connect(url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 937, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 663, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 563, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1032, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1323, in _create_direct_connection
    raise ClientConnectorDNSError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorDNSError: Cannot connect to host gateway-us-east1-c.discord.gg:443 ssl:default [nodename nor servname provided, or not known]
2025-10-01 12:21:41,605 - ERROR - Attempting a reconnect in 114.10s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1317, in _create_direct_connection
    hosts = await self._resolve_host(host, port, traces=traces)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 971, in _resolve_host
    return await asyncio.shield(resolved_host_task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1002, in _resolve_host_with_throttle
    addrs = await self._resolver.resolve(host, port, family=self._family)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/resolver.py", line 38, in resolve
    infos = await self._loop.getaddrinfo(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 905, in getaddrinfo
    return await self.run_in_executor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 978, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 664, in connect
    self.ws = await asyncio.wait_for(coro, timeout=60.0)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 374, in from_client
    socket = await client.http.ws_connect(str(url))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 550, in ws_connect
    return await self.__session.ws_connect(url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 937, in _ws_connect
    resp = await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client.py", line 663, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 563, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1032, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/connector.py", line 1323, in _create_direct_connection
    raise ClientConnectorDNSError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorDNSError: Cannot connect to host gateway-us-east1-c.discord.gg:443 ssl:default [nodename nor servname provided, or not known]
2025-10-01 13:24:49,158 - INFO - Shard ID None session has been invalidated.
2025-10-01 13:24:54,695 - INFO - Shard ID None has connected to Gateway (Session ID: 1fdf272771fe43e6b579ddb1e68e1986).
2025-10-01 13:28:24,414 - WARNING - Can't keep up, shard ID None websocket is 39.0s behind.
2025-10-01 13:31:42,422 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 13:31:42,834 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 13:31:42,987 - INFO - Executed query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK) with params: (601579326714019840, 4610, 899)
2025-10-01 13:31:43,342 - INFO - Insert completed with query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK).
2025-10-01 13:31:43,546 - INFO - Executed query: UPDATE economy SET DAILY = %s WHERE ID = %s with params: (1759318302.465501, 601579326714019840)
2025-10-01 13:31:44,254 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 13:31:44,405 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 13:31:44,438 - INFO - XP: 7, Level: 4
2025-10-01 13:31:44,647 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 17, 4, 17, 4)
2025-10-01 13:32:27,890 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 13:32:28,072 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 13:32:28,101 - INFO - XP: 17, Level: 4
2025-10-01 13:32:28,459 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 30, 4, 30, 4)
2025-10-01 13:32:44,236 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 121, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 89, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 13:32:54,247 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 121, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 89, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 13:32:57,396 - ERROR - Attempting a reconnect in 483.83s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 667, in connect
    await self.ws.poll_event()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 625, in poll_event
    await self.received_message(msg.data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 533, in received_message
    await self.send_as_json(beat)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 661, in send_as_json
    await self.send(utils._to_json(data))
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 657, in send
    await self.socket.send_str(data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client_ws.py", line 226, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 750, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 690, in _send_frame
    self._write(header + mask + message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 723, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
2025-10-01 13:37:56,658 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381059068805910728, 601579326714019840, '601579326714019840', 10)
2025-10-01 13:37:56,822 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381286558401040384, 1380335174901960725, '1380335174901960725', 10)
2025-10-01 13:38:04,574 - INFO - Loaded environment variables from .env
2025-10-01 13:38:05,389 - INFO - Database connection pool created.
2025-10-01 13:38:05,598 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 13:38:05,630 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 13:38:05,934 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 13:38:05,966 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 13:38:06,164 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 13:38:06,221 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 13:38:06,426 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 13:38:06,459 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 13:38:06,679 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 13:38:06,712 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 13:38:06,956 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 13:38:06,989 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 13:38:07,524 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 13:38:07,563 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 13:38:07,759 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 13:38:07,787 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 13:38:08,011 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 13:38:08,042 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 13:38:08,170 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 13:38:08,199 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 13:38:08,210 - WARNING - PyNaCl is not installed, voice will NOT be supported
2025-10-01 13:38:08,211 - INFO - logging in using static token
2025-10-01 13:38:08,229 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://10.5.15.181:8080
2025-10-01 13:38:08,230 - INFO - [33mPress CTRL+C to quit[0m
2025-10-01 13:38:08,965 - INFO - Loaded environment variables from .env
2025-10-01 13:38:09,854 - INFO - Database connection pool created.
2025-10-01 13:38:10,117 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 13:38:10,149 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 13:38:10,278 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 13:38:10,309 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 13:38:10,446 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 13:38:10,479 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 13:38:10,625 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 13:38:10,656 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 13:38:10,785 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 13:38:10,827 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 13:38:10,958 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 13:38:10,989 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 13:38:11,182 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 13:38:11,215 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 13:38:11,508 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 13:38:11,545 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 13:38:11,677 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 13:38:11,717 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 13:38:11,841 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 13:38:11,873 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 13:38:11,879 - INFO - Loaded environment variables from .env
2025-10-01 13:38:12,968 - INFO - Database connection pool created.
2025-10-01 13:38:13,092 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 13:38:13,122 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 13:38:13,275 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 13:38:13,307 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 13:38:13,430 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 13:38:13,463 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 13:38:13,589 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 13:38:13,621 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 13:38:13,747 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 13:38:13,775 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 13:38:13,901 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 13:38:13,932 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 13:38:14,303 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 13:38:14,335 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 13:38:14,465 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 13:38:14,497 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 13:38:14,626 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 13:38:14,658 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 13:38:14,777 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 13:38:14,806 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 13:38:14,828 - INFO - Loaded environment variables from .env
2025-10-01 13:38:16,064 - INFO - Database connection pool created.
2025-10-01 13:38:16,190 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 13:38:16,227 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 13:38:16,349 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 13:38:16,392 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 13:38:16,521 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 13:38:16,552 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 13:38:16,683 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 13:38:16,738 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 13:38:16,866 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 13:38:16,942 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 13:38:17,178 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 13:38:17,209 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 13:38:17,376 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 13:38:17,422 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 13:38:17,560 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 13:38:17,591 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 13:38:17,721 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 13:38:17,754 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 13:38:17,880 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 13:38:17,910 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 13:38:17,919 - INFO - Loaded environment variables from .env
2025-10-01 13:38:18,999 - INFO - Database connection pool created.
2025-10-01 13:38:19,129 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 13:38:19,162 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 13:38:19,285 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 13:38:19,317 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 13:38:19,447 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 13:38:19,482 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 13:38:19,838 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 13:38:19,873 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 13:38:20,011 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 13:38:20,041 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 13:38:20,172 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 13:38:20,201 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 13:38:20,402 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 13:38:20,433 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 13:38:20,561 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 13:38:20,591 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 13:38:20,722 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 13:38:20,751 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 13:38:20,891 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 13:38:20,927 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 13:38:20,932 - INFO - Loaded environment variables from .env
2025-10-01 13:38:22,061 - INFO - Database connection pool created.
2025-10-01 13:38:22,191 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 13:38:22,228 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 13:38:22,574 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 13:38:22,640 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 13:38:22,770 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 13:38:22,803 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 13:38:22,953 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 13:38:22,984 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 13:38:23,135 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 13:38:23,172 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 13:38:23,336 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 13:38:23,366 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 13:38:23,493 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 13:38:23,523 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 13:38:23,649 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 13:38:23,681 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 13:38:24,044 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 13:38:24,075 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 13:38:24,201 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 13:38:24,262 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 13:38:24,300 - INFO - Loaded environment variables from .env
2025-10-01 13:38:25,119 - INFO - Database connection pool created.
2025-10-01 13:38:25,422 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 13:38:25,450 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 13:38:25,574 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 13:38:25,604 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 13:38:25,746 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 13:38:25,774 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 13:38:25,897 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 13:38:25,927 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 13:38:26,055 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 13:38:26,085 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 13:38:26,218 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 13:38:26,246 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 13:38:26,365 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 13:38:26,395 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 13:38:26,815 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 13:38:26,843 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 13:38:26,966 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 13:38:26,996 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 13:38:27,124 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 13:38:27,158 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 13:38:27,168 - INFO - Loaded environment variables from .env
2025-10-01 13:38:28,209 - INFO - Database connection pool created.
2025-10-01 13:38:28,337 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 13:38:28,367 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 13:38:28,491 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 13:38:28,526 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 13:38:28,653 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 13:38:28,686 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 13:38:28,820 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 13:38:28,852 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 13:38:28,982 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 13:38:29,014 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 13:38:29,150 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 13:38:29,187 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 13:38:29,463 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 13:38:29,572 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 13:38:29,941 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 13:38:29,970 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 13:38:30,096 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 13:38:30,129 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 13:38:30,258 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 13:38:30,292 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 13:38:30,420 - INFO - Executed query: SELECT * FROM gamble_rooms with params: None
2025-10-01 13:38:30,461 - INFO - Loaded environment variables from .env
2025-10-01 13:38:31,496 - INFO - Database connection pool created.
2025-10-01 13:38:31,615 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 13:38:31,648 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 13:38:31,777 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 13:38:31,807 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 13:38:31,932 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 13:38:31,964 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 13:38:32,103 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 13:38:32,135 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 13:38:32,489 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 13:38:32,522 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 13:38:32,665 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 13:38:32,696 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 13:38:32,820 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 13:38:32,851 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 13:38:32,977 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 13:38:33,008 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 13:38:33,147 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 13:38:33,181 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 13:38:33,307 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 13:38:33,337 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 13:38:34,836 - INFO - Shard ID None has connected to Gateway (Session ID: 0d2ba1b0d9e24ae933fbc01cd0005fbc).
2025-10-01 13:57:32,672 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-10-01 13:57:33,111 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 13:57:33,779 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 13:57:33,833 - INFO - XP: 30, Level: 4
2025-10-01 13:57:34,241 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 40, 4, 40, 4)
2025-10-01 13:57:56,037 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 13:57:56,538 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 13:57:56,596 - INFO - XP: 40, Level: 4
2025-10-01 13:57:56,868 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 53, 4, 53, 4)
2025-10-01 13:59:22,862 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 13:59:23,270 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 13:59:23,305 - INFO - XP: 53, Level: 4
2025-10-01 13:59:23,472 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 68, 4, 68, 4)
2025-10-01 14:02:55,640 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381059068805910728, 601579326714019840, '601579326714019840', 10)
2025-10-01 14:02:55,926 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381286558401040384, 1380335174901960725, '1380335174901960725', 10)
2025-10-01 14:02:58,778 - INFO - Loaded environment variables from .env
2025-10-01 14:03:00,146 - INFO - Database connection pool created.
2025-10-01 14:03:00,421 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:03:00,480 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:03:00,965 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:03:01,010 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:03:01,345 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:03:01,418 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:03:01,870 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:03:01,962 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:03:02,468 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:03:02,512 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:03:02,922 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:03:02,960 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:03:03,205 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:03:03,241 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:03:03,968 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:03:04,006 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:03:04,323 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:03:04,490 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:03:04,872 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:03:05,146 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:03:05,167 - WARNING - PyNaCl is not installed, voice will NOT be supported
2025-10-01 14:03:05,170 - INFO - logging in using static token
2025-10-01 14:03:05,196 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://10.5.15.181:8080
2025-10-01 14:03:05,196 - INFO - [33mPress CTRL+C to quit[0m
2025-10-01 14:03:05,931 - INFO - Loaded environment variables from .env
2025-10-01 14:03:08,022 - INFO - Database connection pool created.
2025-10-01 14:03:08,472 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:03:08,686 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:03:09,210 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:03:09,300 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:03:09,496 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:03:09,548 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:03:09,837 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:03:09,888 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:03:10,139 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:03:10,257 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:03:10,784 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:03:10,816 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:03:11,031 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:03:11,076 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:03:11,305 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:03:11,401 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:03:11,719 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:03:11,831 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:03:12,354 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:03:12,435 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:03:12,439 - INFO - Loaded environment variables from .env
2025-10-01 14:03:15,338 - INFO - Database connection pool created.
2025-10-01 14:03:15,891 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:03:16,025 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:03:16,421 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:03:16,549 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:03:16,764 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:03:16,818 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:03:17,170 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:03:17,270 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:03:17,917 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:03:17,972 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:03:18,234 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:03:18,338 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:03:18,646 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:03:18,705 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:03:19,223 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:03:19,298 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:03:19,559 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:03:19,696 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:03:20,075 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:03:20,222 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:03:20,244 - INFO - Loaded environment variables from .env
2025-10-01 14:03:22,423 - INFO - Database connection pool created.
2025-10-01 14:03:22,605 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:03:22,655 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:03:22,953 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:03:22,993 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:03:23,469 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:03:23,514 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:03:23,732 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:03:23,789 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:03:24,125 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:03:24,166 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:03:24,489 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:03:24,545 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:03:25,096 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:03:25,150 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:03:25,460 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:03:25,526 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:03:25,879 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:03:26,083 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:03:26,351 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:03:26,393 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:03:26,402 - INFO - Loaded environment variables from .env
2025-10-01 14:03:28,608 - INFO - Database connection pool created.
2025-10-01 14:03:29,132 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:03:29,189 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:03:29,535 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:03:29,656 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:03:29,898 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:03:30,031 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:03:30,776 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:03:30,806 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:03:30,941 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:03:30,973 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:03:31,231 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:03:31,320 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:03:31,822 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:03:31,890 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:03:32,078 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:03:32,137 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:03:32,559 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:03:32,662 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:03:33,327 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:03:33,390 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:03:33,398 - INFO - Loaded environment variables from .env
2025-10-01 14:03:35,562 - INFO - Database connection pool created.
2025-10-01 14:03:36,065 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:03:36,122 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:03:36,474 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:03:36,580 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:03:37,109 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:03:37,522 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:03:38,371 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:03:38,443 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:03:38,890 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:03:38,941 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:03:39,296 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:03:39,429 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:03:39,826 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:03:39,900 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:03:40,364 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:03:40,423 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:03:40,916 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:03:41,092 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:03:41,295 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:03:41,327 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:03:41,381 - INFO - Loaded environment variables from .env
2025-10-01 14:03:43,486 - INFO - Database connection pool created.
2025-10-01 14:03:43,891 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:03:43,987 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:03:44,536 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:03:44,580 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:03:44,865 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:03:44,930 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:03:45,100 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:03:45,134 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:03:45,296 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:03:45,422 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:03:45,574 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:03:45,667 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:03:46,040 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:03:46,093 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:03:46,435 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:03:46,509 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:03:46,753 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:03:46,843 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:03:47,381 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:03:47,483 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:03:47,495 - INFO - Loaded environment variables from .env
2025-10-01 14:03:50,243 - INFO - Database connection pool created.
2025-10-01 14:03:50,631 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:03:50,743 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:03:51,472 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:03:51,510 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:03:51,787 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:03:51,851 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:03:52,199 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:03:52,248 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:03:52,457 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:03:52,515 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:03:52,882 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:03:52,917 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:03:53,110 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:03:53,251 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:03:53,551 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:03:53,650 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:03:53,992 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:03:54,301 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:03:54,526 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:03:54,619 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:03:55,031 - INFO - Executed query: SELECT * FROM gamble_rooms with params: None
2025-10-01 14:03:55,100 - INFO - Loaded environment variables from .env
2025-10-01 14:03:57,444 - INFO - Database connection pool created.
2025-10-01 14:03:57,844 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:03:57,970 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:03:58,540 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:03:58,601 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:03:59,022 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:03:59,145 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:03:59,910 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:03:59,953 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:04:00,261 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:04:00,372 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:04:00,746 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:04:00,829 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:04:01,321 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:04:01,386 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:04:01,810 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:04:01,969 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:04:02,319 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:04:02,349 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:04:02,823 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:04:02,894 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:04:10,552 - INFO - Shard ID None has connected to Gateway (Session ID: 7f435815aaa34bceeee30586d990dbbd).
2025-10-01 14:04:16,575 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-10-01 14:04:16,915 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:04:17,455 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:04:17,504 - INFO - XP: 68, Level: 4
2025-10-01 14:04:17,782 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 81, 4, 81, 4)
2025-10-01 14:05:23,596 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381059068805910728, 601579326714019840, '601579326714019840', 10)
2025-10-01 14:05:23,796 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381286558401040384, 1380335174901960725, '1380335174901960725', 10)
2025-10-01 14:05:56,224 - INFO - Loaded environment variables from .env
2025-10-01 14:05:58,953 - INFO - Database connection pool created.
2025-10-01 14:05:59,323 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:05:59,412 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:05:59,811 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:06:00,220 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:06:00,498 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:06:00,654 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:06:01,177 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:06:01,286 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:06:01,824 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:06:01,893 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:06:02,319 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:06:02,414 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:06:02,753 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:06:03,069 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:06:03,342 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:06:03,422 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:06:03,639 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:06:03,800 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:06:04,028 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:06:04,392 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:06:04,404 - WARNING - PyNaCl is not installed, voice will NOT be supported
2025-10-01 14:06:04,405 - INFO - logging in using static token
2025-10-01 14:06:04,416 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://10.5.15.181:8080
2025-10-01 14:06:04,416 - INFO - [33mPress CTRL+C to quit[0m
2025-10-01 14:06:06,636 - INFO - Loaded environment variables from .env
2025-10-01 14:06:09,385 - INFO - Database connection pool created.
2025-10-01 14:06:10,249 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:06:10,316 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:06:10,614 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:06:10,701 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:06:11,142 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:06:11,194 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:06:11,812 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:06:11,861 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:06:12,186 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:06:12,288 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:06:12,710 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:06:12,980 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:06:13,238 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:06:13,307 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:06:13,895 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:06:14,042 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:06:14,586 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:06:14,642 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:06:14,980 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:06:15,090 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:06:15,096 - INFO - Loaded environment variables from .env
2025-10-01 14:06:17,496 - INFO - Database connection pool created.
2025-10-01 14:06:17,837 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:06:17,955 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:06:18,252 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:06:18,329 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:06:18,839 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:06:18,908 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:06:19,239 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:06:19,287 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:06:19,427 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:06:19,668 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:06:20,156 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:06:20,215 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:06:20,575 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:06:20,674 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:06:20,976 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:06:21,101 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:06:21,664 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:06:21,725 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:06:21,958 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:06:22,002 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:06:22,033 - INFO - Loaded environment variables from .env
2025-10-01 14:06:24,406 - INFO - Database connection pool created.
2025-10-01 14:06:24,635 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:06:24,768 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:06:24,964 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:06:24,999 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:06:25,190 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:06:25,291 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:06:25,449 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:06:25,485 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:06:25,990 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:06:26,349 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:06:26,607 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:06:26,642 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:06:26,866 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:06:26,906 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:06:27,393 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:06:27,480 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:06:28,148 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:06:28,284 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:06:28,861 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:06:28,964 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:06:28,978 - INFO - Loaded environment variables from .env
2025-10-01 14:06:30,332 - INFO - Database connection pool created.
2025-10-01 14:06:30,600 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:06:30,656 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:06:30,902 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:06:30,960 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:06:31,286 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:06:31,634 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:06:31,850 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:06:31,910 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:06:32,202 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:06:32,267 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:06:32,538 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:06:32,634 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:06:33,156 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:06:33,212 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:06:33,681 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:06:33,809 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:06:34,501 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:06:34,558 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:06:35,114 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:06:35,255 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:06:35,262 - INFO - Loaded environment variables from .env
2025-10-01 14:06:36,568 - INFO - Database connection pool created.
2025-10-01 14:06:36,715 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:06:36,829 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:06:36,955 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:06:36,985 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:06:37,445 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:06:37,489 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:06:37,614 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:06:37,643 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:06:37,764 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:06:37,873 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:06:37,995 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:06:38,024 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:06:38,142 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:06:38,172 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:06:38,729 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:06:38,760 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:06:39,000 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:06:39,033 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:06:39,192 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:06:39,229 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:06:39,286 - INFO - Loaded environment variables from .env
2025-10-01 14:06:41,639 - INFO - Database connection pool created.
2025-10-01 14:06:41,918 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:06:41,954 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:06:42,285 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:06:42,343 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:06:42,486 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:06:42,593 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:06:42,950 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:06:42,985 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:06:43,226 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:06:43,263 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:06:43,412 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:06:43,449 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:06:43,677 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:06:43,716 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:06:43,862 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:06:43,907 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:06:44,052 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:06:44,371 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:06:44,508 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:06:44,540 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:06:44,553 - INFO - Loaded environment variables from .env
2025-10-01 14:06:45,827 - INFO - Database connection pool created.
2025-10-01 14:06:46,079 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:06:46,113 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:06:46,408 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:06:46,442 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:06:46,579 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:06:46,608 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:06:46,886 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:06:46,921 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:06:47,388 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:06:47,418 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:06:47,614 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:06:47,646 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:06:47,865 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:06:47,898 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:06:48,064 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:06:48,102 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:06:48,653 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:06:48,692 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:06:48,943 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:06:48,983 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:06:49,157 - INFO - Executed query: SELECT * FROM gamble_rooms with params: None
2025-10-01 14:06:49,211 - INFO - Loaded environment variables from .env
2025-10-01 14:06:50,888 - INFO - Database connection pool created.
2025-10-01 14:06:51,104 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:06:51,147 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:06:51,536 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:06:51,599 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:06:51,735 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:06:51,762 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:06:51,894 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:06:51,928 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:06:52,125 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:06:52,163 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:06:52,289 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:06:52,324 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:06:52,450 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:06:52,555 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:06:52,689 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:06:52,936 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:06:53,145 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:06:53,181 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:06:53,335 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:06:53,368 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:06:54,172 - INFO - Shard ID None has connected to Gateway (Session ID: 720cd93ec82f9e3019aacb5bcbfebf6f).
2025-10-01 14:07:06,220 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-10-01 14:07:06,407 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:07:06,580 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:07:06,613 - INFO - XP: 81, Level: 4
2025-10-01 14:07:06,816 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 95, 4, 95, 4)
2025-10-01 14:07:07,393 - ERROR - Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 116, in chat_with_npc
    history = self.memory.get_conversation(npc_name, player_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NPCMemory' object has no attribute 'get_conversation'. Did you mean: 'log_conversation'?

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/listeners.py", line 164, in on_command_error
    raise error
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NPCMemory' object has no attribute 'get_conversation'
2025-10-01 14:07:07,402 - ERROR - Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 116, in chat_with_npc
    history = self.memory.get_conversation(npc_name, player_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NPCMemory' object has no attribute 'get_conversation'. Did you mean: 'log_conversation'?

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/informational.py", line 212, in on_command_error
    raise error  # Let default handler run too
    ^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/listeners.py", line 164, in on_command_error
    raise error
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NPCMemory' object has no attribute 'get_conversation'
2025-10-01 14:10:10,327 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381059068805910728, 601579326714019840, '601579326714019840', 10)
2025-10-01 14:10:10,910 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381286558401040384, 1380335174901960725, '1380335174901960725', 10)
2025-10-01 14:11:57,358 - INFO - Loaded environment variables from .env
2025-10-01 14:12:00,282 - INFO - Database connection pool created.
2025-10-01 14:12:00,716 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:12:00,853 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:12:01,586 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:12:01,681 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:12:01,997 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:12:02,069 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:12:02,256 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:12:02,286 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:12:02,698 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:12:02,729 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:12:02,954 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:12:02,988 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:12:03,212 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:12:03,247 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:12:03,496 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:12:03,533 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:12:03,676 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:12:03,713 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:12:04,133 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:12:04,166 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:12:04,173 - WARNING - PyNaCl is not installed, voice will NOT be supported
2025-10-01 14:12:04,174 - INFO - logging in using static token
2025-10-01 14:12:04,190 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://10.5.15.181:8080
2025-10-01 14:12:04,190 - INFO - [33mPress CTRL+C to quit[0m
2025-10-01 14:12:04,825 - INFO - Loaded environment variables from .env
2025-10-01 14:12:06,086 - INFO - Database connection pool created.
2025-10-01 14:12:06,213 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:12:06,244 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:12:06,384 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:12:06,415 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:12:06,607 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:12:06,844 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:12:06,991 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:12:07,100 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:12:07,230 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:12:07,263 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:12:07,405 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:12:07,452 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:12:07,653 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:12:07,687 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:12:07,828 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:12:07,862 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:12:08,234 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:12:08,263 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:12:08,400 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:12:08,436 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:12:08,445 - INFO - Loaded environment variables from .env
2025-10-01 14:12:09,807 - INFO - Database connection pool created.
2025-10-01 14:12:10,012 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:12:10,052 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:12:10,361 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:12:10,403 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:12:10,576 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:12:10,612 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:12:11,089 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:12:11,129 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:12:11,399 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:12:11,444 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:12:11,678 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:12:11,814 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:12:12,105 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:12:12,424 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:12:12,618 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:12:12,715 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:12:12,955 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:12:12,995 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:12:13,192 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:12:13,339 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:12:13,398 - INFO - Loaded environment variables from .env
2025-10-01 14:12:16,653 - INFO - Database connection pool created.
2025-10-01 14:12:16,899 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:12:16,962 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:12:17,366 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:12:17,484 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:12:18,108 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:12:18,160 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:12:18,448 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:12:18,528 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:12:18,874 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:12:18,948 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:12:19,156 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:12:19,452 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:12:19,681 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:12:19,725 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:12:19,899 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:12:19,955 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:12:20,250 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:12:20,349 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:12:20,847 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:12:20,885 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:12:20,893 - INFO - Loaded environment variables from .env
2025-10-01 14:12:23,174 - INFO - Database connection pool created.
2025-10-01 14:12:23,737 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:12:23,773 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:12:24,037 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:12:24,084 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:12:24,400 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:12:24,464 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:12:24,714 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:12:24,761 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:12:25,257 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:12:25,295 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:12:25,526 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:12:25,561 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:12:25,696 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:12:25,762 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:12:25,973 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:12:26,002 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:12:26,139 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:12:26,173 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:12:26,602 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:12:26,632 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:12:26,634 - INFO - Loaded environment variables from .env
2025-10-01 14:12:27,637 - INFO - Database connection pool created.
2025-10-01 14:12:28,069 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:12:28,112 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:12:28,232 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:12:28,266 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:12:28,385 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:12:28,415 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:12:28,621 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:12:28,651 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:12:28,771 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:12:28,802 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:12:28,923 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:12:28,952 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:12:29,149 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:12:29,179 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:12:29,521 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:12:29,550 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:12:29,757 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:12:29,790 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:12:29,909 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:12:29,939 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:12:29,994 - INFO - Loaded environment variables from .env
2025-10-01 14:12:31,105 - INFO - Database connection pool created.
2025-10-01 14:12:31,314 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:12:31,345 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:12:31,457 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:12:31,488 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:12:31,609 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:12:31,641 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:12:31,831 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:12:31,864 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:12:31,984 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:12:32,012 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:12:32,391 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:12:32,422 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:12:32,550 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:12:32,579 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:12:32,788 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:12:32,827 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:12:32,951 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:12:32,980 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:12:33,098 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:12:33,130 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:12:33,143 - INFO - Loaded environment variables from .env
2025-10-01 14:12:34,685 - INFO - Database connection pool created.
2025-10-01 14:12:35,288 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:12:35,410 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:12:35,773 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:12:35,935 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:12:36,181 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:12:36,235 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:12:36,698 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:12:36,776 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:12:37,181 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:12:37,267 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:12:37,655 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:12:37,788 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:12:38,275 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:12:38,313 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:12:38,555 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:12:38,633 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:12:38,901 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:12:39,081 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:12:39,654 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:12:39,708 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:12:40,130 - INFO - Executed query: SELECT * FROM gamble_rooms with params: None
2025-10-01 14:12:40,190 - INFO - Loaded environment variables from .env
2025-10-01 14:12:42,874 - INFO - Database connection pool created.
2025-10-01 14:12:43,366 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:12:43,455 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:12:43,899 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:12:43,960 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:12:44,321 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:12:44,445 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:12:44,849 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:12:45,236 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:12:45,574 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:12:45,674 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:12:46,031 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:12:46,113 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:12:46,802 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:12:46,941 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:12:47,261 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:12:47,326 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:12:47,572 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:12:47,604 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:12:47,857 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:12:48,040 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:12:49,040 - INFO - Shard ID None has connected to Gateway (Session ID: 062debd252aa7ecbce78436fdcc89dda).
2025-10-01 14:13:13,575 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-10-01 14:13:13,998 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:13:14,549 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:13:14,958 - INFO - XP: 95, Level: 4
2025-10-01 14:13:15,276 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 111, 4, 111, 4)
2025-10-01 14:13:15,949 - ERROR - Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 75, in chat_with_npc
    history = self.memory.get_conversation(npc_name, player_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NPCMemory' object has no attribute 'get_conversation'. Did you mean: 'log_conversation'?

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/listeners.py", line 164, in on_command_error
    raise error
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NPCMemory' object has no attribute 'get_conversation'
2025-10-01 14:13:15,962 - ERROR - Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 75, in chat_with_npc
    history = self.memory.get_conversation(npc_name, player_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NPCMemory' object has no attribute 'get_conversation'. Did you mean: 'log_conversation'?

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/informational.py", line 212, in on_command_error
    raise error  # Let default handler run too
    ^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/listeners.py", line 164, in on_command_error
    raise error
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NPCMemory' object has no attribute 'get_conversation'
2025-10-01 14:15:31,134 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381059068805910728, 601579326714019840, '601579326714019840', 10)
2025-10-01 14:15:31,356 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381286558401040384, 1380335174901960725, '1380335174901960725', 10)
2025-10-01 14:15:43,688 - INFO - Loaded environment variables from .env
2025-10-01 14:15:46,049 - INFO - Database connection pool created.
2025-10-01 14:15:46,429 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:15:46,502 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:15:46,902 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:15:46,979 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:15:47,165 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:15:47,323 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:15:47,837 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:15:47,934 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:15:48,178 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:15:48,228 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:15:48,488 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:15:48,526 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:15:48,778 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:15:48,885 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:15:49,408 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:15:49,525 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:15:50,055 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:15:50,311 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:15:50,787 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:15:50,885 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:15:50,905 - WARNING - PyNaCl is not installed, voice will NOT be supported
2025-10-01 14:15:50,909 - INFO - logging in using static token
2025-10-01 14:15:50,941 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://10.5.15.181:8080
2025-10-01 14:15:50,941 - INFO - [33mPress CTRL+C to quit[0m
2025-10-01 14:15:51,672 - INFO - Loaded environment variables from .env
2025-10-01 14:15:54,654 - INFO - Database connection pool created.
2025-10-01 14:15:54,894 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:15:54,959 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:15:55,244 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:15:55,342 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:15:55,860 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:15:55,981 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:15:56,500 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:15:56,553 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:15:56,918 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:15:57,019 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:15:57,454 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:15:57,523 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:15:57,675 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:15:57,799 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:15:58,168 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:15:58,325 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:15:58,863 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:15:59,047 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:15:59,470 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:15:59,514 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:15:59,529 - INFO - Loaded environment variables from .env
2025-10-01 14:16:01,004 - INFO - Database connection pool created.
2025-10-01 14:16:01,354 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:16:01,470 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:16:01,718 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:16:01,859 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:16:02,331 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:16:02,375 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:16:02,642 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:16:02,721 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:16:03,327 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:16:03,368 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:16:03,653 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:16:03,701 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:16:03,943 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:16:03,984 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:16:04,238 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:16:04,291 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:16:04,505 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:16:04,616 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:16:05,257 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:16:05,383 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:16:05,410 - INFO - Loaded environment variables from .env
2025-10-01 14:16:07,804 - INFO - Database connection pool created.
2025-10-01 14:16:07,986 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:16:08,068 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:16:08,469 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:16:08,602 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:16:09,052 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:16:09,090 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:16:09,335 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:16:09,387 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:16:09,734 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:16:09,857 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:16:10,268 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:16:10,383 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:16:10,560 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:16:10,600 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:16:10,907 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:16:10,992 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:16:11,446 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:16:11,610 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:16:12,296 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:16:12,480 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:16:12,487 - INFO - Loaded environment variables from .env
2025-10-01 14:16:14,346 - INFO - Database connection pool created.
2025-10-01 14:16:14,670 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:16:14,706 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:16:14,966 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:16:15,103 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:16:15,498 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:16:15,624 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:16:16,358 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:16:16,503 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:16:17,085 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:16:17,204 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:16:17,629 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:16:17,724 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:16:18,067 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:16:18,249 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:16:19,001 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:16:19,074 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:16:19,853 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:16:19,938 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:16:20,200 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:16:20,238 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:16:20,251 - INFO - Loaded environment variables from .env
2025-10-01 14:16:23,924 - INFO - Database connection pool created.
2025-10-01 14:16:24,370 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:16:24,412 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:16:24,821 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:16:24,942 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:16:25,587 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:16:25,974 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:16:26,473 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:16:26,638 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:16:27,198 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:16:27,241 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:16:27,432 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:16:27,496 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:16:27,897 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:16:28,013 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:16:28,529 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:16:28,570 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:16:28,834 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:16:28,895 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:16:29,255 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:16:29,377 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:16:29,429 - INFO - Loaded environment variables from .env
2025-10-01 14:16:32,013 - INFO - Database connection pool created.
2025-10-01 14:16:32,416 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:16:32,516 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:16:33,076 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:16:33,116 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:16:33,451 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:16:33,558 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:16:33,976 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:16:34,072 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:16:34,661 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:16:34,706 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:16:35,026 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:16:35,133 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:16:35,646 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:16:35,683 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:16:35,859 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:16:35,910 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:16:36,283 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:16:36,400 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:16:37,124 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:16:37,332 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:16:37,345 - INFO - Loaded environment variables from .env
2025-10-01 14:16:39,219 - INFO - Database connection pool created.
2025-10-01 14:16:39,745 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:16:40,055 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:16:40,308 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:16:40,379 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:16:40,684 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:16:40,793 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:16:41,319 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:16:41,393 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:16:41,581 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:16:41,652 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:16:42,242 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:16:42,405 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:16:43,037 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:16:43,124 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:16:43,703 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:16:43,937 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:16:44,535 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:16:44,636 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:16:45,125 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:16:45,247 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:16:45,586 - INFO - Executed query: SELECT * FROM gamble_rooms with params: None
2025-10-01 14:16:45,638 - INFO - Loaded environment variables from .env
2025-10-01 14:16:47,605 - INFO - Database connection pool created.
2025-10-01 14:16:47,799 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:16:47,841 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:16:48,130 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:16:48,231 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:16:48,524 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:16:48,561 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:16:48,796 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:16:48,837 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:16:49,028 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:16:49,071 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:16:49,294 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:16:49,336 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:16:49,503 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:16:49,540 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:16:49,772 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:16:49,812 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:16:49,995 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:16:50,032 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:16:50,264 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:16:50,303 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:16:51,656 - INFO - Shard ID None has connected to Gateway (Session ID: 5e86136158891189b680a3ca3da93b3a).
2025-10-01 14:17:02,078 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-10-01 14:17:02,422 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:17:03,105 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:17:03,237 - INFO - XP: 111, Level: 4
2025-10-01 14:17:03,731 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 119, 4, 119, 4)
2025-10-01 14:17:07,915 - ERROR - Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/cogs/admin.py", line 159, in _purge
    await ctx.channel.purge(limit=n % 100)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/channel.py", line 532, in purge
    return await discord.abc._purge_helper(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/abc.py", line 188, in _purge_helper
    await ret[-1].delete()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/message.py", line 1001, in delete
    await self._state.http.delete_message(self.channel.id, self.id)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 754, in request
    raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10008): Unknown Message

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/listeners.py", line 164, in on_command_error
    raise error
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NotFound: 404 Not Found (error code: 10008): Unknown Message
2025-10-01 14:17:07,931 - ERROR - Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/cogs/admin.py", line 159, in _purge
    await ctx.channel.purge(limit=n % 100)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/channel.py", line 532, in purge
    return await discord.abc._purge_helper(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/abc.py", line 188, in _purge_helper
    await ret[-1].delete()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/message.py", line 1001, in delete
    await self._state.http.delete_message(self.channel.id, self.id)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 754, in request
    raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10008): Unknown Message

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/informational.py", line 212, in on_command_error
    raise error  # Let default handler run too
    ^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/listeners.py", line 164, in on_command_error
    raise error
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NotFound: 404 Not Found (error code: 10008): Unknown Message
2025-10-01 14:17:28,171 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:17:28,648 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:17:28,750 - INFO - XP: 119, Level: 4
2025-10-01 14:17:29,434 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 125, 4, 125, 4)
2025-10-01 14:17:45,089 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:17:45,571 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:17:45,662 - INFO - XP: 125, Level: 4
2025-10-01 14:17:46,227 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 130, 4, 130, 4)
2025-10-01 14:17:59,516 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:17:59,962 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:18:00,062 - INFO - XP: 130, Level: 4
2025-10-01 14:18:00,591 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 142, 4, 142, 4)
2025-10-01 14:18:23,456 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:18:33,465 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:18:43,473 - WARNING - Shard ID None heartbeat blocked for more than 30 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:18:53,481 - WARNING - Shard ID None heartbeat blocked for more than 40 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:18:57,470 - ERROR - Attempting a reconnect in 1.63s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 667, in connect
    await self.ws.poll_event()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 625, in poll_event
    await self.received_message(msg.data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 533, in received_message
    await self.send_as_json(beat)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 661, in send_as_json
    await self.send(utils._to_json(data))
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 657, in send
    await self.socket.send_str(data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client_ws.py", line 226, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 750, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 690, in _send_frame
    self._write(header + mask + message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 723, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
2025-10-01 14:18:59,742 - INFO - Shard ID None has successfully RESUMED session 5e86136158891189b680a3ca3da93b3a.
2025-10-01 14:19:21,091 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:19:21,576 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:19:21,633 - INFO - XP: 142, Level: 4
2025-10-01 14:19:21,972 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 149, 4, 149, 4)
2025-10-01 14:19:50,645 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:20:00,656 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:20:06,583 - ERROR - Attempting a reconnect in 0.51s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 667, in connect
    await self.ws.poll_event()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 625, in poll_event
    await self.received_message(msg.data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 533, in received_message
    await self.send_as_json(beat)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 661, in send_as_json
    await self.send(utils._to_json(data))
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 657, in send
    await self.socket.send_str(data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client_ws.py", line 226, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 750, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 690, in _send_frame
    self._write(header + mask + message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 723, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
2025-10-01 14:20:08,647 - INFO - Shard ID None has successfully RESUMED session 5e86136158891189b680a3ca3da93b3a.
2025-10-01 14:20:09,986 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:20:10,151 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:20:10,187 - INFO - XP: 149, Level: 4
2025-10-01 14:20:10,573 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 158, 4, 158, 4)
2025-10-01 14:21:20,021 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:21:20,178 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:21:20,209 - INFO - XP: 158, Level: 4
2025-10-01 14:21:20,582 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 168, 4, 168, 4)
2025-10-01 14:21:45,370 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:21:55,383 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:22:05,037 - ERROR - Attempting a reconnect in 1.99s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 667, in connect
    await self.ws.poll_event()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 625, in poll_event
    await self.received_message(msg.data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 533, in received_message
    await self.send_as_json(beat)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 661, in send_as_json
    await self.send(utils._to_json(data))
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 657, in send
    await self.socket.send_str(data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client_ws.py", line 226, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 750, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 690, in _send_frame
    self._write(header + mask + message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 723, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
2025-10-01 14:22:07,455 - INFO - Shard ID None has successfully RESUMED session 5e86136158891189b680a3ca3da93b3a.
2025-10-01 14:22:08,112 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:22:08,730 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:22:09,162 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:22:09,227 - INFO - XP: 168, Level: 4
2025-10-01 14:22:09,593 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 174, 4, 174, 4)
2025-10-01 14:22:41,445 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:22:41,969 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:22:42,040 - INFO - XP: 174, Level: 4
2025-10-01 14:22:42,426 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 187, 4, 187, 4)
2025-10-01 14:22:58,500 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:23:08,509 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:23:18,517 - WARNING - Shard ID None heartbeat blocked for more than 30 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:23:28,521 - WARNING - Shard ID None heartbeat blocked for more than 40 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:23:31,538 - ERROR - Attempting a reconnect in 3.00s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 667, in connect
    await self.ws.poll_event()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 625, in poll_event
    await self.received_message(msg.data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 533, in received_message
    await self.send_as_json(beat)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 661, in send_as_json
    await self.send(utils._to_json(data))
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 657, in send
    await self.socket.send_str(data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client_ws.py", line 226, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 750, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 690, in _send_frame
    self._write(header + mask + message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 723, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
2025-10-01 14:23:40,383 - INFO - Shard ID None session has been invalidated.
2025-10-01 14:23:45,942 - INFO - Shard ID None has connected to Gateway (Session ID: 338a87db73e280e0b850dfe423000894).
2025-10-01 14:24:48,673 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:24:49,147 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:24:49,223 - INFO - XP: 187, Level: 4
2025-10-01 14:24:49,675 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 198, 4, 198, 4)
2025-10-01 14:25:13,230 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    "description": f"Help {npc.name} with a task suitable for level {player_level}.",
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    for player_msg, npc_reply in history[-3:]:
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:25:23,240 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    "description": f"Help {npc.name} with a task suitable for level {player_level}.",
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    for player_msg, npc_reply in history[-3:]:
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:25:33,249 - WARNING - Shard ID None heartbeat blocked for more than 30 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 96, in chat_with_npc
    "description": f"Help {npc.name} with a task suitable for level {player_level}.",
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 47, in query_llm
    for player_msg, npc_reply in history[-3:]:
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:25:36,939 - ERROR - Attempting a reconnect in 24.01s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 667, in connect
    await self.ws.poll_event()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 625, in poll_event
    await self.received_message(msg.data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 533, in received_message
    await self.send_as_json(beat)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 661, in send_as_json
    await self.send(utils._to_json(data))
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 657, in send
    await self.socket.send_str(data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client_ws.py", line 226, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 750, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 690, in _send_frame
    self._write(header + mask + message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 723, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
2025-10-01 14:26:05,794 - INFO - Shard ID None session has been invalidated.
2025-10-01 14:26:11,619 - INFO - Shard ID None has connected to Gateway (Session ID: 54953c578c975cebbbf122fc0fc986e8).
2025-10-01 14:26:18,154 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381059068805910728, 601579326714019840, '601579326714019840', 10)
2025-10-01 14:26:18,509 - INFO - Executed query: REPLACE INTO gamble_rooms (channel_id, host_id, invited, inactivity) VALUES (%s, %s, %s, %s) with params: (1381286558401040384, 1380335174901960725, '1380335174901960725', 10)
2025-10-01 14:26:24,853 - INFO - Loaded environment variables from .env
2025-10-01 14:26:26,318 - INFO - Database connection pool created.
2025-10-01 14:26:26,480 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:26:26,522 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:26:26,791 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:26:26,851 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:26:27,068 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:26:27,104 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:26:27,467 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:26:27,507 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:26:27,788 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:26:27,862 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:26:28,132 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:26:28,248 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:26:28,383 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:26:28,416 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:26:28,551 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:26:28,589 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:26:28,914 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:26:28,958 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:26:29,111 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:26:29,146 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:26:29,157 - WARNING - PyNaCl is not installed, voice will NOT be supported
2025-10-01 14:26:29,158 - INFO - logging in using static token
2025-10-01 14:26:29,174 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8080
 * Running on http://10.5.15.181:8080
2025-10-01 14:26:29,175 - INFO - [33mPress CTRL+C to quit[0m
2025-10-01 14:26:30,162 - INFO - Loaded environment variables from .env
2025-10-01 14:26:31,091 - INFO - Database connection pool created.
2025-10-01 14:26:31,504 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:26:31,540 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:26:31,666 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:26:31,697 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:26:31,919 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:26:31,954 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:26:32,114 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:26:32,151 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:26:32,335 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:26:32,444 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:26:33,080 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:26:33,139 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:26:33,620 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:26:33,712 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:26:34,017 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:26:34,297 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:26:34,539 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:26:34,625 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:26:34,851 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:26:34,885 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:26:34,889 - INFO - Loaded environment variables from .env
2025-10-01 14:26:36,211 - INFO - Database connection pool created.
2025-10-01 14:26:36,331 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:26:36,360 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:26:36,492 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:26:36,525 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:26:36,729 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:26:36,764 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:26:37,161 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:26:37,191 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:26:37,374 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:26:37,409 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:26:37,562 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:26:37,594 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:26:37,820 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:26:37,859 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:26:38,000 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:26:38,042 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:26:38,569 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:26:38,605 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:26:38,864 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:26:38,893 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:26:38,922 - INFO - Loaded environment variables from .env
2025-10-01 14:26:40,178 - INFO - Database connection pool created.
2025-10-01 14:26:40,376 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:26:40,412 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:26:40,552 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:26:40,592 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:26:40,831 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:26:40,865 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:26:41,010 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:26:41,053 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:26:41,525 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:26:41,560 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:26:41,749 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:26:41,780 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:26:41,979 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:26:42,018 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:26:42,206 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:26:42,245 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:26:42,490 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:26:42,639 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:26:43,040 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:26:43,141 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:26:43,147 - INFO - Loaded environment variables from .env
2025-10-01 14:26:45,737 - INFO - Database connection pool created.
2025-10-01 14:26:45,973 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:26:46,077 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:26:46,400 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:26:46,478 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:26:47,124 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:26:47,171 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:26:47,398 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:26:47,463 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:26:47,794 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:26:47,859 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:26:48,475 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:26:48,524 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:26:48,853 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:26:48,949 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:26:49,443 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:26:49,549 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:26:50,071 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:26:50,126 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:26:50,561 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:26:50,628 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:26:50,637 - INFO - Loaded environment variables from .env
2025-10-01 14:26:53,001 - INFO - Database connection pool created.
2025-10-01 14:26:53,147 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:26:53,181 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:26:53,415 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:26:53,453 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:26:53,636 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:26:53,705 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:26:54,036 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:26:54,113 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:26:54,332 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:26:54,361 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:26:54,558 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:26:54,588 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:26:54,720 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:26:54,799 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:26:55,017 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:26:55,049 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:26:55,195 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:26:55,226 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:26:55,340 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:26:55,371 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:26:55,425 - INFO - Loaded environment variables from .env
2025-10-01 14:26:57,186 - INFO - Database connection pool created.
2025-10-01 14:26:57,664 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:26:57,696 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:26:57,825 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:26:57,856 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:26:57,978 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:26:58,012 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:26:58,225 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:26:58,255 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:26:58,716 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:26:58,747 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:26:58,865 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:26:58,894 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:26:59,021 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:26:59,053 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:26:59,277 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:26:59,312 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:26:59,426 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:26:59,455 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:26:59,570 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:26:59,599 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:26:59,611 - INFO - Loaded environment variables from .env
2025-10-01 14:27:00,840 - INFO - Database connection pool created.
2025-10-01 14:27:00,958 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:27:00,986 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:27:01,134 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:27:01,165 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:27:01,832 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:27:01,869 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:27:01,994 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:27:02,025 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:27:02,150 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:27:02,180 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:27:02,384 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:27:02,413 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:27:02,533 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:27:02,564 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:27:02,852 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:27:02,907 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:27:03,070 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:27:03,125 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:27:03,265 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:27:03,373 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:27:03,505 - INFO - Executed query: SELECT * FROM gamble_rooms with params: None
2025-10-01 14:27:03,541 - INFO - Loaded environment variables from .env
2025-10-01 14:27:05,557 - INFO - Database connection pool created.
2025-10-01 14:27:05,851 - INFO - Executed query: CREATE TABLE IF NOT EXISTS feedback (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            ) with params: None
2025-10-01 14:27:05,998 - INFO - Ensured table feedback exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USER VARCHAR(100),
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            CONTENT TEXT
            
2025-10-01 14:27:06,268 - INFO - Executed query: CREATE TABLE IF NOT EXISTS afk_status (
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            ) with params: None
2025-10-01 14:27:06,377 - INFO - Ensured table afk_status exists with schema: 
            USERID BIGINT,
            GUILDID BIGINT,
            TIMESTAMP VARCHAR(32),
            REASON TEXT,
            PRIMARY KEY (USERID, GUILDID)
            
2025-10-01 14:27:06,641 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_tickets (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            ) with params: None
2025-10-01 14:27:06,690 - INFO - Ensured table lottery_tickets exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            USERID BIGINT NOT NULL,
            TIMESTAMP DATETIME NOT NULL,
            TICKET_TYPE VARCHAR(32) NOT NULL,
            group_id VARCHAR(32) DEFAULT NULL
            
2025-10-01 14:27:06,830 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_results (
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            ) with params: None
2025-10-01 14:27:07,165 - INFO - Ensured table lottery_results exists with schema: 
            ID INT AUTO_INCREMENT PRIMARY KEY,
            WINNER_ID BIGINT NOT NULL,
            AMOUNT INT NOT NULL,
            DRAW_TIME DATETIME NOT NULL,
            CLAIMED BOOLEAN DEFAULT 0,
            WIN_TYPE VARCHAR(16) DEFAULT 'user'
            
2025-10-01 14:27:07,354 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_state (
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            ) with params: None
2025-10-01 14:27:07,393 - INFO - Ensured table lottery_state exists with schema: 
            id INT PRIMARY KEY,
            jackpot INT NOT NULL
            
2025-10-01 14:27:07,647 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_draw_time (
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            ) with params: None
2025-10-01 14:27:07,679 - INFO - Ensured table lottery_draw_time exists with schema: 
            id INT PRIMARY KEY,
            last_draw DATETIME NOT NULL
            
2025-10-01 14:27:07,826 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_luck (
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            ) with params: None
2025-10-01 14:27:07,861 - INFO - Ensured table lottery_luck exists with schema: 
            USERID BIGINT PRIMARY KEY,
            LUCK INT NOT NULL DEFAULT 0
            
2025-10-01 14:27:08,097 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_groups (
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            ) with params: None
2025-10-01 14:27:08,150 - INFO - Ensured table lottery_groups exists with schema: 
            group_id VARCHAR(32) PRIMARY KEY,
            creator_id BIGINT NOT NULL
            
2025-10-01 14:27:08,447 - INFO - Executed query: CREATE TABLE IF NOT EXISTS lottery_group_members (
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            ) with params: None
2025-10-01 14:27:08,616 - INFO - Ensured table lottery_group_members exists with schema: 
            group_id VARCHAR(32),
            user_id BIGINT,
            PRIMARY KEY (group_id, user_id)
            
2025-10-01 14:27:08,756 - INFO - Executed query: CREATE TABLE IF NOT EXISTS gamble_rooms (
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            ) with params: None
2025-10-01 14:27:08,796 - INFO - Ensured table gamble_rooms exists with schema: 
            channel_id BIGINT PRIMARY KEY,
            host_id BIGINT NOT NULL,
            invited TEXT NOT NULL,
            inactivity INT NOT NULL
            
2025-10-01 14:27:09,666 - INFO - Shard ID None has connected to Gateway (Session ID: 2f1143979a734b5ed7cba4c43bd3a43f).
2025-10-01 14:27:26,446 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-10-01 14:27:27,186 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:27:27,531 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:27:27,581 - INFO - XP: 198, Level: 4
2025-10-01 14:27:28,017 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 206, 4, 206, 4)
2025-10-01 14:28:21,379 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:28:21,620 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:28:21,653 - INFO - XP: 206, Level: 4
2025-10-01 14:28:21,851 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 219, 4, 219, 4)
2025-10-01 14:28:41,854 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:28:51,610 - ERROR - Attempting a reconnect in 0.38s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 667, in connect
    await self.ws.poll_event()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 625, in poll_event
    await self.received_message(msg.data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 533, in received_message
    await self.send_as_json(beat)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 661, in send_as_json
    await self.send(utils._to_json(data))
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 657, in send
    await self.socket.send_str(data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client_ws.py", line 226, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 750, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 690, in _send_frame
    self._write(header + mask + message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 723, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
2025-10-01 14:28:52,334 - INFO - Shard ID None has successfully RESUMED session 2f1143979a734b5ed7cba4c43bd3a43f.
2025-10-01 14:29:27,902 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:29:28,411 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:29:28,498 - INFO - XP: 219, Level: 4
2025-10-01 14:29:28,854 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 230, 4, 230, 4)
2025-10-01 14:29:43,441 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:29:53,449 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:29:56,967 - ERROR - Attempting a reconnect in 0.99s
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 667, in connect
    await self.ws.poll_event()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 625, in poll_event
    await self.received_message(msg.data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 533, in received_message
    await self.send_as_json(beat)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 661, in send_as_json
    await self.send(utils._to_json(data))
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/gateway.py", line 657, in send
    await self.socket.send_str(data)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/client_ws.py", line 226, in send_str
    await self._writer.send(data, binary=False, compress=compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 750, in send
    await self._send_frame(message, WSMsgType.TEXT, compress)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 690, in _send_frame
    self._write(header + mask + message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 723, in _write
    raise ClientConnectionResetError("Cannot write to closing transport")
aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
2025-10-01 14:29:58,344 - INFO - Shard ID None has successfully RESUMED session 2f1143979a734b5ed7cba4c43bd3a43f.
2025-10-01 14:30:10,287 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:30:10,737 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:30:10,833 - INFO - XP: 230, Level: 4
2025-10-01 14:30:11,120 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 242, 4, 242, 4)
2025-10-01 14:31:07,787 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:31:08,128 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:31:08,236 - INFO - XP: 242, Level: 4
2025-10-01 14:31:08,572 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 255, 4, 255, 4)
2025-10-01 14:31:30,685 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:31:40,694 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:31:50,702 - WARNING - Shard ID None heartbeat blocked for more than 30 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:32:00,711 - WARNING - Shard ID None heartbeat blocked for more than 40 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:32:10,722 - WARNING - Shard ID None heartbeat blocked for more than 50 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:32:20,731 - WARNING - Shard ID None heartbeat blocked for more than 60 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:32:30,742 - WARNING - Shard ID None heartbeat blocked for more than 70 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:32:40,749 - WARNING - Shard ID None heartbeat blocked for more than 80 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:32:50,768 - WARNING - Shard ID None heartbeat blocked for more than 90 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:33:00,776 - WARNING - Shard ID None heartbeat blocked for more than 100 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:33:06,730 - INFO - Shard ID None session has been invalidated.
2025-10-01 14:33:12,257 - INFO - Shard ID None has connected to Gateway (Session ID: 53dee4bf715ffca423025902d01d4642).
2025-10-01 14:33:47,280 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:33:47,752 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:33:47,868 - INFO - XP: 255, Level: 4
2025-10-01 14:33:48,567 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 264, 4, 264, 4)
2025-10-01 14:34:40,480 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:34:50,490 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:35:00,497 - WARNING - Shard ID None heartbeat blocked for more than 30 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:35:10,506 - WARNING - Shard ID None heartbeat blocked for more than 40 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:35:20,499 - WARNING - Shard ID None heartbeat blocked for more than 50 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:35:30,497 - WARNING - Shard ID None heartbeat blocked for more than 60 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 14:35:40,412 - INFO - Shard ID None session has been invalidated.
2025-10-01 14:35:46,145 - INFO - Shard ID None has connected to Gateway (Session ID: e020354a8c293758a1955dd3753887ab).
2025-10-01 14:35:56,228 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:35:56,705 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:35:57,162 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:35:57,243 - INFO - XP: 264, Level: 4
2025-10-01 14:35:57,634 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 274, 4, 274, 4)
2025-10-01 14:37:20,857 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:37:21,524 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:37:21,608 - INFO - XP: 274, Level: 4
2025-10-01 14:37:21,970 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 282, 4, 282, 4)
2025-10-01 14:37:41,126 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:37:41,652 - INFO - Executed query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK) with params: (601579326714019840, 4610, 1000899)
2025-10-01 14:37:42,019 - INFO - Insert completed with query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK).
2025-10-01 14:37:42,234 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:37:42,895 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:37:43,589 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:37:43,685 - INFO - XP: 282, Level: 4
2025-10-01 14:37:44,348 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 295, 4, 295, 4)
2025-10-01 14:37:58,666 - INFO - Executed query: SELECT ID, XP, LEVEL FROM users with params: None
2025-10-01 14:37:58,909 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:37:59,423 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:37:59,461 - INFO - XP: 295, Level: 4
2025-10-01 14:37:59,705 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 301, 4, 301, 4)
2025-10-01 14:38:07,305 - INFO - Executed query: SELECT * FROM economy ORDER BY BANK + WALLET DESC with params: None
2025-10-01 14:38:08,045 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:38:08,410 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:38:08,569 - INFO - XP: 301, Level: 4
2025-10-01 14:38:08,906 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 311, 4, 311, 4)
2025-10-01 14:38:57,560 - WARNING - Attempt 1 failed: 1146 (42S02): Table 'dbDiscord.gamble_limits' doesn't exist
2025-10-01 14:38:58,998 - WARNING - Attempt 2 failed: 1146 (42S02): Table 'dbDiscord.gamble_limits' doesn't exist
2025-10-01 14:39:01,349 - WARNING - Attempt 3 failed: 1146 (42S02): Table 'dbDiscord.gamble_limits' doesn't exist
2025-10-01 14:39:05,354 - ERROR - All 3 attempts failed for query: SELECT * FROM gamble_limits WHERE USERID = %s
2025-10-01 14:39:05,836 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:06,247 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:39:06,906 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:06,966 - INFO - XP: 311, Level: 4
2025-10-01 14:39:07,392 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 320, 4, 320, 4)
2025-10-01 14:39:20,992 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:21,207 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:22,124 - INFO - Executed query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK) with params: (601579326714019840, 1004610, 899)
2025-10-01 14:39:23,356 - INFO - Insert completed with query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK).
2025-10-01 14:39:23,739 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:39:24,072 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:24,131 - INFO - XP: 320, Level: 4
2025-10-01 14:39:24,372 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 327, 4, 327, 4)
2025-10-01 14:39:25,932 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:39:26,588 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:26,693 - INFO - XP: 327, Level: 4
2025-10-01 14:39:26,997 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 335, 4, 335, 4)
2025-10-01 14:39:36,886 - WARNING - Attempt 1 failed: 1146 (42S02): Table 'dbDiscord.gamble_limits' doesn't exist
2025-10-01 14:39:38,112 - WARNING - Attempt 2 failed: 1146 (42S02): Table 'dbDiscord.gamble_limits' doesn't exist
2025-10-01 14:39:40,690 - WARNING - Attempt 3 failed: 1146 (42S02): Table 'dbDiscord.gamble_limits' doesn't exist
2025-10-01 14:39:44,691 - ERROR - All 3 attempts failed for query: SELECT * FROM gamble_limits WHERE USERID = %s
2025-10-01 14:39:45,076 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:45,283 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:45,568 - INFO - Executed query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK) with params: (601579326714019840, 2004610, 899)
2025-10-01 14:39:45,729 - INFO - Insert completed with query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK).
2025-10-01 14:39:45,898 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:39:46,315 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:46,355 - INFO - XP: 335, Level: 4
2025-10-01 14:39:46,684 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 342, 4, 342, 4)
2025-10-01 14:39:54,044 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:39:54,234 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:54,350 - INFO - XP: 342, Level: 4
2025-10-01 14:39:54,991 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 351, 4, 351, 4)
2025-10-01 14:39:58,022 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:58,302 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:39:58,726 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:39:58,765 - INFO - XP: 351, Level: 4
2025-10-01 14:39:59,231 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 358, 4, 358, 4)
2025-10-01 14:40:32,749 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:40:33,151 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:40:33,808 - INFO - Executed query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK) with params: (601579326714019840, 0, 2005509)
2025-10-01 14:40:34,304 - INFO - Insert completed with query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK).
2025-10-01 14:40:34,819 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:40:35,151 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:40:35,341 - INFO - XP: 358, Level: 4
2025-10-01 14:40:35,970 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 367, 4, 367, 4)
2025-10-01 14:42:21,910 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:42:22,276 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:42:22,345 - INFO - XP: 367, Level: 4
2025-10-01 14:42:22,614 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 377, 4, 377, 4)
2025-10-01 14:42:25,229 - ERROR - Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/cogs/admin.py", line 191, in _nuke
    await self._send_embed(
  File "/Users/niels/Documents/DiscordBot/cogs/admin.py", line 219, in _send_embed
    await ctx.send(embed=embed)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/context.py", line 1039, in send
    return await super().send(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/abc.py", line 1618, in send
    data = await state.http.send_message(channel.id, params=params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 754, in request
    raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10003): Unknown Channel

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/listeners.py", line 164, in on_command_error
    raise error
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NotFound: 404 Not Found (error code: 10003): Unknown Channel
2025-10-01 14:42:25,241 - ERROR - Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/cogs/admin.py", line 191, in _nuke
    await self._send_embed(
  File "/Users/niels/Documents/DiscordBot/cogs/admin.py", line 219, in _send_embed
    await ctx.send(embed=embed)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/context.py", line 1039, in send
    return await super().send(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/abc.py", line 1618, in send
    data = await state.http.send_message(channel.id, params=params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/http.py", line 754, in request
    raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10003): Unknown Channel

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/informational.py", line 212, in on_command_error
    raise error  # Let default handler run too
    ^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/listeners.py", line 164, in on_command_error
    raise error
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 244, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NotFound: 404 Not Found (error code: 10003): Unknown Channel
2025-10-01 14:42:39,508 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:42:40,103 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:42:40,186 - INFO - XP: 377, Level: 4
2025-10-01 14:42:40,669 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 387, 4, 387, 4)
2025-10-01 14:42:40,786 - ERROR - Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/informational.py", line 212, in on_command_error
    raise error  # Let default handler run too
    ^^^^^^^^^^^
discord.ext.commands.errors.CommandNotFound: Command "welcometest" is not found
2025-10-01 14:43:05,609 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:43:05,899 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:43:05,962 - INFO - XP: 387, Level: 4
2025-10-01 14:43:06,217 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 395, 4, 395, 4)
2025-10-01 14:43:13,308 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381694149761302719 responded with 429. Retrying in 0.51 seconds.
2025-10-01 14:43:14,402 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381694110930571364 responded with 429. Retrying in 0.41 seconds.
2025-10-01 14:43:15,296 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381694106501386362 responded with 429. Retrying in 0.52 seconds.
2025-10-01 14:43:16,258 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381694100092227585 responded with 429. Retrying in 0.56 seconds.
2025-10-01 14:43:17,224 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381694075291570318 responded with 429. Retrying in 0.59 seconds.
2025-10-01 14:43:18,350 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381694041988792471 responded with 429. Retrying in 0.46 seconds.
2025-10-01 14:43:19,212 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381694036431208671 responded with 429. Retrying in 0.60 seconds.
2025-10-01 14:43:20,270 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381693328256405537 responded with 429. Retrying in 0.54 seconds.
2025-10-01 14:43:21,256 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381693324016091166 responded with 429. Retrying in 0.55 seconds.
2025-10-01 14:43:22,237 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381693317271650386 responded with 429. Retrying in 0.57 seconds.
2025-10-01 14:43:23,162 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381693313123487796 responded with 429. Retrying in 0.64 seconds.
2025-10-01 14:43:24,337 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381693295133986836 responded with 429. Retrying in 0.47 seconds.
2025-10-01 14:43:25,167 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381693008537321605 responded with 429. Retrying in 0.64 seconds.
2025-10-01 14:43:26,321 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381692981517619293 responded with 429. Retrying in 0.49 seconds.
2025-10-01 14:43:27,254 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381663924440531126 responded with 429. Retrying in 0.55 seconds.
2025-10-01 14:43:28,187 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381663924348522566 responded with 429. Retrying in 0.63 seconds.
2025-10-01 14:43:29,350 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381663839270993940 responded with 429. Retrying in 0.46 seconds.
2025-10-01 14:43:30,201 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660675536846878 responded with 429. Retrying in 0.61 seconds.
2025-10-01 14:43:31,213 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660667890634833 responded with 429. Retrying in 0.59 seconds.
2025-10-01 14:43:32,306 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660641991069776 responded with 429. Retrying in 0.51 seconds.
2025-10-01 14:43:33,206 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660638178443456 responded with 429. Retrying in 0.60 seconds.
2025-10-01 14:43:34,152 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660631492595742 responded with 429. Retrying in 0.65 seconds.
2025-10-01 14:43:35,157 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660628107657399 responded with 429. Retrying in 0.65 seconds.
2025-10-01 14:43:36,199 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660440970399875 responded with 429. Retrying in 0.61 seconds.
2025-10-01 14:43:37,264 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660433592615045 responded with 429. Retrying in 0.54 seconds.
2025-10-01 14:43:38,171 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660348695711894 responded with 429. Retrying in 0.63 seconds.
2025-10-01 14:43:39,175 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660345130549268 responded with 429. Retrying in 0.63 seconds.
2025-10-01 14:43:40,184 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660248669950094 responded with 429. Retrying in 0.62 seconds.
2025-10-01 14:43:41,218 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660240482799646 responded with 429. Retrying in 0.59 seconds.
2025-10-01 14:43:42,161 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660050661179413 responded with 429. Retrying in 0.65 seconds.
2025-10-01 14:43:43,179 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660050598264926 responded with 429. Retrying in 0.63 seconds.
2025-10-01 14:43:44,187 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660047326707763 responded with 429. Retrying in 0.62 seconds.
2025-10-01 14:43:45,253 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660045053399150 responded with 429. Retrying in 0.57 seconds.
2025-10-01 14:43:46,207 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660039688753363 responded with 429. Retrying in 0.61 seconds.
2025-10-01 14:43:47,215 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381660019074007062 responded with 429. Retrying in 0.59 seconds.
2025-10-01 14:43:48,242 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381659977067925534 responded with 429. Retrying in 0.56 seconds.
2025-10-01 14:43:49,193 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381659426095890602 responded with 429. Retrying in 0.62 seconds.
2025-10-01 14:43:50,215 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381659146482614274 responded with 429. Retrying in 0.59 seconds.
2025-10-01 14:43:51,233 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381659086159876309 responded with 429. Retrying in 0.58 seconds.
2025-10-01 14:43:52,268 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381659001363628113 responded with 429. Retrying in 0.54 seconds.
2025-10-01 14:43:53,213 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381658997190561853 responded with 429. Retrying in 0.60 seconds.
2025-10-01 14:43:54,264 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381658990391595142 responded with 429. Retrying in 0.54 seconds.
2025-10-01 14:43:55,206 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381658985576271912 responded with 429. Retrying in 0.60 seconds.
2025-10-01 14:43:56,165 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381658957411778629 responded with 429. Retrying in 0.64 seconds.
2025-10-01 14:43:57,295 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381658897642946570 responded with 429. Retrying in 0.51 seconds.
2025-10-01 14:43:58,243 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381647340854837279 responded with 429. Retrying in 0.56 seconds.
2025-10-01 14:43:59,234 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381647337054666832 responded with 429. Retrying in 0.58 seconds.
2025-10-01 14:44:00,333 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381647332939927562 responded with 429. Retrying in 0.48 seconds.
2025-10-01 14:44:01,184 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381647328607211530 responded with 429. Retrying in 0.62 seconds.
2025-10-01 14:44:02,237 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381647311343583404 responded with 429. Retrying in 0.57 seconds.
2025-10-01 14:44:03,187 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381647078752518177 responded with 429. Retrying in 0.62 seconds.
2025-10-01 14:44:04,162 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381647076470947881 responded with 429. Retrying in 0.65 seconds.
2025-10-01 14:44:05,256 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381647067901853797 responded with 429. Retrying in 0.55 seconds.
2025-10-01 14:44:06,251 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381647064122917005 responded with 429. Retrying in 0.57 seconds.
2025-10-01 14:44:07,262 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381647053964312679 responded with 429. Retrying in 0.56 seconds.
2025-10-01 14:44:08,349 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381645750412382318 responded with 429. Retrying in 0.46 seconds.
2025-10-01 14:44:09,228 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381645746754949222 responded with 429. Retrying in 0.60 seconds.
2025-10-01 14:44:10,241 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381645618652647557 responded with 429. Retrying in 0.57 seconds.
2025-10-01 14:44:11,183 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381645600579387484 responded with 429. Retrying in 0.63 seconds.
2025-10-01 14:44:12,249 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381645596816965755 responded with 429. Retrying in 0.56 seconds.
2025-10-01 14:44:13,177 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381645558086631444 responded with 429. Retrying in 0.63 seconds.
2025-10-01 14:44:14,180 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381645541292900412 responded with 429. Retrying in 0.63 seconds.
2025-10-01 14:44:15,219 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381645530668732508 responded with 429. Retrying in 0.59 seconds.
2025-10-01 14:44:16,225 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381645502654972145 responded with 429. Retrying in 0.58 seconds.
2025-10-01 14:44:17,196 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381644942602010644 responded with 429. Retrying in 0.61 seconds.
2025-10-01 14:44:18,209 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381644915674451979 responded with 429. Retrying in 0.60 seconds.
2025-10-01 14:44:19,150 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381644867087761519 responded with 429. Retrying in 0.67 seconds.
2025-10-01 14:44:20,284 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381644847613612156 responded with 429. Retrying in 0.52 seconds.
2025-10-01 14:44:21,177 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381644837794611240 responded with 429. Retrying in 0.63 seconds.
2025-10-01 14:44:22,266 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381644824012390563 responded with 429. Retrying in 0.54 seconds.
2025-10-01 14:44:23,215 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381643918499774514 responded with 429. Retrying in 0.60 seconds.
2025-10-01 14:44:24,348 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381643915035152556 responded with 429. Retrying in 0.46 seconds.
2025-10-01 14:44:25,221 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381643870366072944 responded with 429. Retrying in 0.59 seconds.
2025-10-01 14:44:26,202 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381643554434191463 responded with 429. Retrying in 0.61 seconds.
2025-10-01 14:44:29,335 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381643432157773835 responded with 429. Retrying in 0.48 seconds.
2025-10-01 14:44:30,256 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642848935481476 responded with 429. Retrying in 0.55 seconds.
2025-10-01 14:44:31,237 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642832934207700 responded with 429. Retrying in 0.57 seconds.
2025-10-01 14:44:32,220 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642756664987748 responded with 429. Retrying in 0.59 seconds.
2025-10-01 14:44:33,214 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642745105354753 responded with 429. Retrying in 0.60 seconds.
2025-10-01 14:44:34,213 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642722171162674 responded with 429. Retrying in 0.59 seconds.
2025-10-01 14:44:35,169 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642504142590144 responded with 429. Retrying in 0.65 seconds.
2025-10-01 14:44:36,360 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642502842617966 responded with 429. Retrying in 0.48 seconds.
2025-10-01 14:44:37,229 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642469296308285 responded with 429. Retrying in 0.58 seconds.
2025-10-01 14:44:38,214 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642433896386591 responded with 429. Retrying in 0.59 seconds.
2025-10-01 14:44:39,180 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642293357969500 responded with 429. Retrying in 0.62 seconds.
2025-10-01 14:44:40,180 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381642253541572659 responded with 429. Retrying in 0.64 seconds.
2025-10-01 14:44:41,250 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381640057772835017 responded with 429. Retrying in 0.57 seconds.
2025-10-01 14:44:42,313 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381640053695971359 responded with 429. Retrying in 0.51 seconds.
2025-10-01 14:44:43,198 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381640024973639762 responded with 429. Retrying in 0.60 seconds.
2025-10-01 14:44:44,181 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381640017461645433 responded with 429. Retrying in 0.63 seconds.
2025-10-01 14:44:45,525 - WARNING - We are being rate limited. DELETE https://discord.com/api/v10/channels/1380534004385841152/messages/1381639945080274946 responded with 429. Retrying in 0.30 seconds.
2025-10-01 14:48:44,203 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:48:44,843 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:48:44,940 - INFO - XP: 395, Level: 4
2025-10-01 14:48:45,228 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 400, 4, 400, 4)
2025-10-01 14:48:49,040 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:48:49,396 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:48:49,482 - INFO - XP: 400, Level: 4
2025-10-01 14:48:50,353 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 411, 4, 411, 4)
2025-10-01 14:49:09,319 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-01 14:49:09,654 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-01 14:49:09,694 - INFO - XP: 411, Level: 4
2025-10-01 14:49:09,858 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 422, 4, 422, 4)
2025-10-01 15:08:10,258 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 15:08:20,279 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 15:08:30,284 - WARNING - Shard ID None heartbeat blocked for more than 30 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 15:08:40,294 - WARNING - Shard ID None heartbeat blocked for more than 40 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 15:18:57,670 - WARNING - Shard ID None heartbeat blocked for more than 50 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 15:20:04,871 - WARNING - Shard ID None heartbeat blocked for more than 60 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 15:54:12,271 - WARNING - Shard ID None heartbeat blocked for more than 70 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 16:10:23,769 - WARNING - Shard ID None heartbeat blocked for more than 80 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 16:10:33,789 - WARNING - Shard ID None heartbeat blocked for more than 90 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 16:10:43,796 - WARNING - Shard ID None heartbeat blocked for more than 100 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-01 16:10:45,483 - INFO - Shard ID None session has been invalidated.
2025-10-01 16:10:51,527 - INFO - Shard ID None has connected to Gateway (Session ID: 68bc0624c6b62d91eb9805c9ed4374d1).
2025-10-01 16:28:41,402 - INFO - Shard ID None session has been invalidated.
2025-10-01 16:44:21,819 - INFO - Shard ID None session has been invalidated.
2025-10-01 16:50:11,352 - INFO - Shard ID None session has been invalidated.
2025-10-01 17:05:48,380 - INFO - Shard ID None session has been invalidated.
2025-10-01 17:21:45,784 - INFO - Shard ID None session has been invalidated.
2025-10-01 17:21:51,455 - INFO - Shard ID None has connected to Gateway (Session ID: 09c2fb962c1a07f7bfe7b692c6161719).
2025-10-01 17:23:55,900 - INFO - Shard ID None has successfully RESUMED session 09c2fb962c1a07f7bfe7b692c6161719.
2025-10-01 18:40:06,764 - INFO - Shard ID None session has been invalidated.
2025-10-01 18:40:14,117 - INFO - Shard ID None has connected to Gateway (Session ID: ad64f37154c1a2cd0ff214eb01a26c51).
2025-10-01 19:02:38,511 - INFO - Shard ID None session has been invalidated.
2025-10-01 19:18:10,143 - INFO - Shard ID None session has been invalidated.
2025-10-01 19:35:48,488 - INFO - Shard ID None session has been invalidated.
2025-10-01 19:51:24,853 - INFO - Shard ID None session has been invalidated.
2025-10-01 19:51:30,476 - INFO - Shard ID None has connected to Gateway (Session ID: bdcfe240e40a11aca72515d372b260e5).
2025-10-01 21:09:02,671 - INFO - Shard ID None session has been invalidated.
2025-10-01 21:10:39,329 - INFO - Shard ID None session has been invalidated.
2025-10-01 21:26:09,166 - INFO - Shard ID None session has been invalidated.
2025-10-01 21:26:14,925 - INFO - Shard ID None has connected to Gateway (Session ID: 920b1e6c62f697b7a665ca897a248f14).
2025-10-01 22:31:25,695 - INFO - Shard ID None session has been invalidated.
2025-10-01 22:34:53,046 - INFO - Shard ID None session has been invalidated.
2025-10-01 22:34:58,929 - INFO - Shard ID None has connected to Gateway (Session ID: be5eaf52788c833710b084cbaebb8568).
2025-10-01 23:10:49,896 - INFO - Shard ID None session has been invalidated.
2025-10-01 23:28:43,270 - INFO - Shard ID None session has been invalidated.
2025-10-01 23:44:20,658 - INFO - Shard ID None session has been invalidated.
2025-10-01 23:56:14,048 - INFO - Shard ID None session has been invalidated.
2025-10-02 00:11:31,145 - INFO - Shard ID None session has been invalidated.
2025-10-02 00:11:36,840 - INFO - Shard ID None has connected to Gateway (Session ID: fb44487544a1770251df4c75debf5128).
2025-10-02 01:20:46,699 - INFO - Shard ID None session has been invalidated.
2025-10-02 01:20:52,256 - INFO - Shard ID None has connected to Gateway (Session ID: 6c95abeb8074e644118926389d1e801a).
2025-10-02 02:36:37,500 - INFO - Shard ID None session has been invalidated.
2025-10-02 02:36:43,220 - INFO - Shard ID None has connected to Gateway (Session ID: 5108a5a30d0681080b938571dc865607).
2025-10-02 03:50:09,125 - INFO - Shard ID None session has been invalidated.
2025-10-02 04:06:51,403 - INFO - Shard ID None session has been invalidated.
2025-10-02 04:06:57,001 - INFO - Shard ID None has connected to Gateway (Session ID: 72252acca382109a71ff1cd8ed6f2ea9).
2025-10-02 05:51:00,602 - INFO - Shard ID None session has been invalidated.
2025-10-02 06:06:08,961 - INFO - Shard ID None session has been invalidated.
2025-10-02 06:23:40,155 - INFO - Shard ID None session has been invalidated.
2025-10-02 06:39:54,279 - INFO - Shard ID None session has been invalidated.
2025-10-02 06:53:27,594 - INFO - Shard ID None session has been invalidated.
2025-10-02 06:53:33,255 - INFO - Shard ID None has connected to Gateway (Session ID: 4994d8a496dd742b57a0521303f7bb26).
2025-10-02 07:44:31,572 - INFO - Shard ID None session has been invalidated.
2025-10-02 08:01:14,871 - INFO - Shard ID None session has been invalidated.
2025-10-02 08:01:20,681 - INFO - Shard ID None has connected to Gateway (Session ID: 5c5fe371d2003175c10ab4e027ce8dea).
2025-10-02 08:38:24,375 - INFO - Shard ID None session has been invalidated.
2025-10-02 08:38:33,392 - INFO - Shard ID None has connected to Gateway (Session ID: c973c84238dfb6ca3c48d7accbaab545).
2025-10-02 08:54:27,287 - INFO - Shard ID None session has been invalidated.
2025-10-02 08:54:39,114 - INFO - Shard ID None has connected to Gateway (Session ID: ed050eb14deb1a0ca0e1006ba1325cb5).
2025-10-02 09:30:04,302 - INFO - Shard ID None session has been invalidated.
2025-10-02 09:30:09,914 - INFO - Shard ID None has connected to Gateway (Session ID: dc5c6ab27c8ee3395695c52e2796d77f).
2025-10-02 09:45:47,294 - INFO - Shard ID None session has been invalidated.
2025-10-02 09:47:59,552 - INFO - Shard ID None session has been invalidated.
2025-10-02 09:48:05,170 - INFO - Shard ID None has connected to Gateway (Session ID: 11aefbc803b5889c2fdbd78d8056d5e5).
2025-10-02 09:48:27,631 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-02 09:48:28,589 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-02 09:48:28,646 - INFO - XP: 422, Level: 4
2025-10-02 09:48:29,362 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 432, 4, 432, 4)
2025-10-02 09:49:58,097 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-02 09:49:58,513 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-02 09:49:58,541 - INFO - XP: 432, Level: 4
2025-10-02 09:49:59,190 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 438, 4, 438, 4)
2025-10-02 09:50:13,534 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-02 09:50:13,867 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-02 09:50:13,920 - INFO - XP: 438, Level: 4
2025-10-02 09:50:14,108 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 450, 4, 450, 4)
2025-10-02 09:50:59,962 - ERROR - 127.0.0.1 - - [02/Oct/2025 09:50:59] code 400, message Bad request version ('\x8dëíFP\x94ÔÒ=^Ú\x93ø8ÁÃ¯Þ\x00*ÚÚ\x13\x01\x13\x02\x13\x03À,À+Ì©À0À/Ì¨À')
2025-10-02 09:50:59,964 - INFO - 127.0.0.1 - - [02/Oct/2025 09:50:59] "[31m[1m\x16\x03\x01\x02\x00\x01\x00\x01ü\x03\x03î\x8aÝíz\x04âF]\x7f!.Ø\x1bp]Ë\x88ÿÉñ\x90¶5¬1\x1b\x0fë°­Q AÝ±\x88²#\x07ÊHM½}ÿ\x0b\x8dëíFP\x94ÔÒ=^Ú\x93ø8ÁÃ¯Þ\x00*ÚÚ\x13\x01\x13\x02\x13\x03À,À+Ì©À0À/Ì¨À[0m" 400 -
2025-10-02 09:50:59,968 - ERROR - 127.0.0.1 - - [02/Oct/2025 09:50:59] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x02\x00\x01\x00\x01ü\x03\x03è')
2025-10-02 09:50:59,968 - INFO - 127.0.0.1 - - [02/Oct/2025 09:50:59] "[31m[1m\x16\x03\x01\x02\x00\x01\x00\x01ü\x03\x03è\x09nO\x9dB\x80à·Ìýk\x89«cãÄ\x82\x0f\x81\x91\x0b[0m" 400 -
2025-10-02 09:50:59,970 - ERROR - 127.0.0.1 - - [02/Oct/2025 09:50:59] code 400, message Bad request version ('NcÌa\x8d>\x90\x97±B&\x00\x00\x14À')
2025-10-02 09:50:59,970 - INFO - 127.0.0.1 - - [02/Oct/2025 09:50:59] "[31m[1m\x16\x03\x01\x00\x8f\x01\x00\x00\x8b\x03\x01\x9c\x94 \x9bª5NÑ\x03nµáä\x92l?vû\x10B\x1eNcÌa\x8d>\x90\x97±B&\x00\x00\x14À[0m" 400 -
2025-10-02 09:51:00,047 - ERROR - 127.0.0.1 - - [02/Oct/2025 09:51:00] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x02\x00\x01\x00\x01ü\x03\x03\x02Y\x9f&~Û§[¯\x0e±ö¯\x06Ç\x19pðy¼õÿ¡\x7fäWÕXh\x00+\x8b')
2025-10-02 09:51:00,047 - INFO - 127.0.0.1 - - [02/Oct/2025 09:51:00] "[31m[1m\x16\x03\x01\x02\x00\x01\x00\x01ü\x03\x03\x02Y\x9f&~Û§[¯\x0e±ö¯\x06Ç\x19pðy¼õÿ¡\x7fäWÕXh\x00+\x8b 2\x1b\x87\x16-\x9a\x19³$õØ3÷d.°Ò·;I"Ã\x80s<÷¶\x90ÕÁ\x97Ë\x00*ÊÊ\x13\x01\x13\x02\x13\x03À,À+Ì©À0À/Ì¨À[0m" 400 -
2025-10-02 09:51:00,049 - ERROR - 127.0.0.1 - - [02/Oct/2025 09:51:00] code 400, message Bad request version ('\x9cAxu,{¶g\x00,ÊÊ\x13\x01\x13\x02\x13\x03À,À+Ì©À0À/Ì¨À')
2025-10-02 09:51:00,049 - INFO - 127.0.0.1 - - [02/Oct/2025 09:51:00] "[31m[1m\x16\x03\x01\x02\x00\x01\x00\x01ü\x03\x03#(üU:(è\x1b´òñ\x1cí\x17\x18v·µûbëSE\x1d\x90êl\x14×\x0dâB \x1e\x87ä9\x860\x17\x9f`\x9fA\x03|¶j\x1fÐ\x80ôyÂ±R\x0d\x9cAxu,{¶g\x00,ÊÊ\x13\x01\x13\x02\x13\x03À,À+Ì©À0À/Ì¨À[0m" 400 -
2025-10-02 09:51:00,050 - ERROR - 127.0.0.1 - - [02/Oct/2025 09:51:00] code 400, message Bad request version ('Â\x14â"\x05½f\x00\x00\x14À')
2025-10-02 09:51:00,050 - INFO - 127.0.0.1 - - [02/Oct/2025 09:51:00] "[31m[1m\x16\x03\x01\x00\x8f\x01\x00\x00\x8b\x03\x01Ñ+!¢\x8dó\x10Ê\x8e\x0b1ö\x92\x09váþ\x06\x04\x98ç.ye\x85Â\x14â"\x05½f\x00\x00\x14À[0m" 400 -
2025-10-02 09:52:47,132 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-02 09:52:47,422 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-02 09:52:47,487 - INFO - XP: 450, Level: 4
2025-10-02 09:52:47,603 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 458, 4, 458, 4)
2025-10-02 09:53:40,113 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:53:50,128 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:54:00,145 - WARNING - Shard ID None heartbeat blocked for more than 30 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:54:10,154 - WARNING - Shard ID None heartbeat blocked for more than 40 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:54:17,136 - INFO - Shard ID None session has been invalidated.
2025-10-02 09:54:22,675 - INFO - Shard ID None has connected to Gateway (Session ID: 9a9201713b22e2cea26ac198a6049c36).
2025-10-02 09:54:58,536 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-02 09:54:58,687 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-02 09:54:58,737 - INFO - XP: 458, Level: 4
2025-10-02 09:54:58,867 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 466, 4, 466, 4)
2025-10-02 09:55:50,258 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:56:00,272 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:56:07,485 - INFO - Shard ID None session has been invalidated.
2025-10-02 09:56:12,991 - INFO - Shard ID None has connected to Gateway (Session ID: 0f0db79bb8b0f610b67837ddff3ad9d9).
2025-10-02 09:57:03,937 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-02 09:57:04,139 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-02 09:57:04,169 - INFO - XP: 466, Level: 4
2025-10-02 09:57:04,308 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 475, 4, 475, 4)
2025-10-02 09:57:40,292 - WARNING - Shard ID None heartbeat blocked for more than 10 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:57:50,302 - WARNING - Shard ID None heartbeat blocked for more than 20 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:58:00,306 - WARNING - Shard ID None heartbeat blocked for more than 30 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:58:10,323 - WARNING - Shard ID None heartbeat blocked for more than 40 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:58:20,331 - WARNING - Shard ID None heartbeat blocked for more than 50 seconds.
Loop thread traceback (most recent call last):
  File "/Users/niels/Documents/DiscordBot/bot.py", line 64, in <module>
    main()
  File "/Users/niels/Documents/DiscordBot/bot.py", line 58, in main
    client.run(token)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 869, in run
    asyncio.run(runner())
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 678, in run_until_complete
    self.run_forever()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 645, in run_forever
    self._run_once()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1999, in _run_once
    handle._run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
    await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1411, in on_message
    await self.process_commands(message)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1408, in process_commands
    await self.invoke(ctx)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/bot.py", line 1366, in invoke
    await ctx.command.invoke(ctx)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 1029, in invoke
    await injected(*ctx.args, **ctx.kwargs)  # type: ignore
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/discord/ext/commands/core.py", line 235, in wrapped
    ret = await coro(*args, **kwargs)
  File "/Users/niels/Documents/DiscordBot/cogs/npc.py", line 28, in talk_to_npc
    response = self.npc_handler.chat_with_npc(
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 64, in chat_with_npc
    llm_response = query_llm(prompt)
  File "/Users/niels/Documents/DiscordBot/utils/npc_handler.py", line 15, in query_llm
    response = requests.post(url, json=payload, timeout=120)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 789, in urlopen
    response = self._make_request(
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/Users/niels/Documents/DiscordBot/.venv-1/lib/python3.12/site-packages/urllib3/connection.py", line 507, in getresponse
    httplib_response = super().getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1430, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
    return self._sock.recv_into(b)

2025-10-02 09:58:29,003 - INFO - Shard ID None session has been invalidated.
2025-10-02 09:58:34,584 - INFO - Shard ID None has connected to Gateway (Session ID: 68d9048b6dab9a1f2b4cb71a61433b0d).
2025-10-02 10:14:37,609 - INFO - Executed query: SELECT REASON FROM afk_status WHERE USERID = %s AND GUILDID = %s with params: (601579326714019840, 1193182989211926558)
2025-10-02 10:14:37,954 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-10-02 10:14:38,171 - INFO - XP: 475, Level: 4
2025-10-02 10:14:38,411 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE XP = %s, LEVEL = %s with params: (601579326714019840, 486, 4, 486, 4)
2025-10-02 10:59:20,063 - INFO - Shard ID None has successfully RESUMED session 68d9048b6dab9a1f2b4cb71a61433b0d.
