Releases: abirxdhack/ItsMrULPBot
ItsMrULPBot v32.0 (Beta) 🛠
ItsMrULPBot — Release Update
Fixed a critical bug in clean.py where all callback query handlers were crashing with "The provided reply markup is invalid" on every button press. The root cause was three separate issues compounding each other.
First, event.message_id does not exist as an attribute on Telethon's CallbackQuery event object. The correct attribute is event.query.msg_id. Using the wrong one was passing garbage message IDs to the edit call, causing it to fail silently or error out.
Second, the previous fix attempt passed ReplyInlineMarkup(rows=[]) to strip buttons from status messages. Telegram's API rejects an empty ReplyInlineMarkup as invalid markup outright, which was the exact error showing in logs. The correct approach is to pass buttons=None via the client's edit_message directly, which omits the markup field from the request entirely.
Third, the _nav_markup function used SmartButtons.build_menu() which always returns a ReplyInlineMarkup object even when zero buttons are added — for example when there is only one page and neither Previous nor Next conditions are met. This produced another empty ReplyInlineMarkup that Telegram rejected. Replaced with native Button.inline() lists that return None when no navigation buttons are needed, which is the format Telethon's client layer handles correctly.
All callback handlers in clean.py were refactored to call ItsMrULPBot.edit_message() directly instead of event.edit(), bypassing Telethon's high-level button re-processing layer which was incompatible with the pre-built markup objects returned by SmartButtons.
Also added README.md with full setup instructions including ripgrep installation, configuration guide, command reference, and project structure. Added requirements.txt with unpinned dependencies and a valid pyproject.toml with complete project metadata.