Commit Graph

107 Commits (73bf6488e1094f5246e6159536f7efb8dddcebbc)

Author SHA1 Message Date
hikariatama 54c568a56b 1.5.0
- Remove junk collector from tl cacher to keep old records so devs can access them w\o making new requests
- Remove FTG License in fully changed files
- Add official GoormIDE support
2022-09-25 16:50:35 +00:00
hikariatama c1fdf9b0b4 1.5.0
- Add ability to create custom IDMs
- Add fields `flags` and `description` to `RegExp` validator
- Add fields `min_len` and `max_len` to `String` validator
- Add `Emoji` validator
- Add `EntityLike` validator
2022-09-23 11:13:59 +00:00
hikariatama 3f2cff2a0f 1.5.0
- Add full trace locals length limit
- Rework full trace locals to hashable converter
2022-09-22 11:04:10 +00:00
hikariatama c5e9b4ce5f 1.5.0
- Add new code input design
- Add new 2fa password input design
- Allow user to send code only once to prevent FloodWaits
2022-09-22 10:46:48 +00:00
hikariatama 3186fe154f 1.5.0
- Completely drop Heroku support due to legacy code, limits and removing of free tier
2022-09-20 16:55:12 +00:00
hikariatama 18a83a748d 1.5.0
- Add ability to set custom emojis in `.info` using command `.setinfo`. In order to use it, remove buttons using config
- Patch internal help module with bugfixes
2022-09-19 13:18:35 +00:00
hikariatama 066f7a46a2 1.5.0
- Fix `on_change` param processing in config
- Fix `hikka.types.CoreOverwriteError`
- Fix incorrect commit in info for users with multiple origins
- Fix error with module configs not being updated to values which were set by user
- Fix core unload and core overwrite errors not being raised correctly
- Fix config descriptions in `APIRatelimiter`
- Fix `CoreOverwriteError` handling
- Fix `TelegramID` validator to work with values between 2^32 and 2^64 - 1
- Fix web authorization messages being sent twice
- Fix duplicated animations in web
- Fix installation banner being shown after auth in web
- Fix form placeholder button being shown when not necessary
- Add `@loader.tag(thumb_url="")` decorator
- Add new inline help format
- Add internal method for debug calls (`.invoke`)
- Add Internal Debug Method (IDM) to inspect cache (`inspect_cache`)
- Add IDM `inspect_modules`
- Add IDM `clear_cache`, `clear_entity_cache`, `clear_fulluser_cache`, `clear_fullchannel_cache`, `clear_perms_cache`
- Add IDM `reload_core` to automatically reload core modules from disk
- Add `hikka.validators.MultiChoice`
- Add `utils.get_args_html` to get arguments of command with HTML
- Add switch to mute @BotFather only once in hikka inline
- Add ability to forbid certain tl methods using `.config APIRatelimiter`
- Add new web interface design
- Clean type-hint mess, document utils and other methods, which were undocumented
- Remove redundant non-working code from configurator
- Remove redundant useless params `--hosting`, `--no-nickname`, `--token`, `--web-only`, `--docker-deps-internal`
- Migrate to lazy string interpolation in logging
- Reformat the whole code to match the desired code style
- Rename `APIRatelimiter` -> `APILimiter`
- Enable `joinChannel` and `importChatInvite` calls-by-external-modules blockage for all users by default
- Change inline query placeholder to `user@hikka:~$` + legacy migration
2022-09-18 15:47:09 +00:00
hikariatama 6476c4adda 1.4.2
- Fix authorization error
2022-09-05 06:17:05 +00:00
hikariatama c3553deed8 Part of 1.4.1 update 2022-09-03 20:32:56 +00:00
hikariatama e90b91ba9d 1.4.1
- Create new type :obj:`hikka.tl_cache.CustomTelegramClient` to avoid monkeypatching
- Add `ttl` param for :method:`hikka.utils.asset_channel`
- Add support for custom branches (e.g. for beta testers and users, who rolled back)
- Fix automatic modules reactions
- Fix :method:`hikka.inline.utils.Utils._find_caller_sec_map`
- Refactor validators to be classes, not functions
- Refactor typehints
2022-08-27 16:55:15 +00:00
hikariatama dc2e86e782 1.4.0
- Add `Presets` core module
- Add handler for `/start` command in inlinebot with userbot info
- Remove custom :obj:`BotInlineMessage` hook for :method:`answer`
2022-08-22 13:28:11 +00:00
hikariatama 89040b6e2f 1.4.0
- Fix grep for messages bigger than 4096 UTF-8 characters
- Rename `func` tag to `filter` due to internal python conflict with dynamically generated methods
- Partially rework security unit
- Internal refactoring and typehints
2022-08-21 21:48:19 +00:00
hikariatama ab8130ed60 1.4.0
- Add platform-specific Hikka emojis to premium users
- Add codepaces to `utils.get_named_platform`
2022-08-21 18:36:33 +00:00
hikariatama 8534c0cafd 1.4.0
- Add `-f` param to `.restart` and `.update`
2022-08-21 16:57:09 +00:00
hikariatama 1ba0d34c7e 1.4.0
- Fix custom security rules cleaner
- Fix: use old lib if its version is higher than new one
2022-08-21 16:53:22 +00:00
hikariatama 33c3d3b72b Fix `.eval` 2022-08-21 15:05:46 +00:00
hikariatama aeddd7a870 1.4.0
- Publish hikka telethon fork and migrate to it in requirements, thereby fixing the deployment error on Heroku
- Add custom emojis filter to `utils.remove_html`
- Fix `client.get_perms_cached`
- Fix translation flaw in `HikkaSecurity`
- Fix `.uninstall_hikka` being accessible by sudo
- Fix `utils.find_caller` for :method:`hikka.inline.utils.Utils._find_caller_sec_map`
- Add more animated emojis to modules
- Add targeted security for users and chats (`.tsec`)
- Add support for `tg_level` in `.config Tester`
2022-08-21 14:55:51 +00:00
hikariatama 15dbdf7ae2 1.3.3 - Fix severe typo, which broke `client.get_fulluser` 2022-08-16 14:22:40 +00:00
hikariatama bdad473eb8 1.3.2
- Add `on_change` param to `loader.ConfigValue`
- Rework commands\inline handlers\callback handlers\watchers registration and unload process
- Rework tags processing
- Add junk collector aka reloader to `Modules`
2022-08-15 16:43:34 +00:00
hikariatama a71b1ca4c9 1.3.1
- Add toggle for custom emojis
2022-08-14 20:35:45 +00:00
hikariatama 84942232da 1.3.1
- Add text validation to info (automatically remove broken tags)
- Add `utils.validate_html` to remove broken tags from text
- Remake all core modules to decorators
- Force custom hikka telethon installation with 144 layer support
- Add animated emojis to core modules strings
2022-08-14 18:49:20 +00:00
hikariatama 7f53220524 Add `client.get_fulluser` with cache 2022-08-09 22:05:35 +00:00
hikariatama a57f15307b 1.3.1
- Add fullchannel caching (`client.get_fullchannel`)
2022-08-09 21:28:02 +00:00
hikariatama edfe1fdd15 1.3.1
check changelog for more info
2022-08-09 20:38:36 +00:00
hikariatama 06917f188f 1.3.1
- Add caching to `utils.asset_channel`
- Add `channel` param to `utils.asset_channel` to actually create a channel, not supergroup
- Add watcher tags: `startswith`, `endswith`, `contains`, `regex`, `func`, `from_id`, `chat_id`
- Add buttons to `Choice` validator in `.config`
- Add new types: `PointerInt`, `PointerList`, `PointerTuple`, `PointerDict`, `PointerStr`, `PointerBool`
- Add `db.pointer`
- Add support for multiaccounting on Heroku
- Add ability to edit only reply markup or only media of message, w/o touching the actual text
- Add support for `@loader.command`-like commands in inline caller finder
- Add `utils.find_caller`
- Add possible cause of error in logs (module and method)
- Add `client.get_perms_cached` to cache native `client.get_permissions`
- Change errors format in web to more human-readable
- Change visible line of traceback in logs to be the last one
- Fix bug with custom_bot option on installation page
- Fix `RecursionError` in entity cacher
- Fix command execution with space between prefix and command
- Fix `utils.answer` for forwarded messages
- Remove `heroku3` from classic requirements, along with heroku installation code snippet
- Remove `termux_requirements.txt`
2022-08-08 20:32:54 +00:00
hikariatama b4d1ef7db1 1.3.0
- Automatically react to module post in developer's channel if possible
2022-08-03 14:41:19 +00:00
hikariatama dfa46a0cc2 1.3.0
- Replace `print` with `logging.info` in main script to make url visible in logs
2022-08-03 13:52:18 +00:00
hikariatama 62a4cc5541 1.2.13
- Add support for :obj:`aiogram.types.Message` in `utils.get_chat_id`
- Add human-readable error message when trying to unload core module
2022-08-03 13:31:32 +00:00
hikariatama 0840efa969 1.2.13
- Add `@loader.command`, `@loader.watcher`, `@loader.inline_handler`, `@loader.callback_handler`
- Add support for multiple watchers
- Add support for command translate directly in decorator (`@loader.command(ru_doc="Привет")`)
2022-08-03 13:12:46 +00:00
hikariatama 51fbb0968c 1.2.13
- Add watcher tags: `no_commands`, `only_commands`, `out`, `in`, `only_messages`, `editable`, `no_media`, `only_media`, `only_photos`, `only_videos`, `only_audios`, `only_docs`, `only_stickers`, `only_inline`, `only_channels`, `only_groups`, `only_pm`. See docs for detailed info
- Add `utils.mime_type` to get mime_type of file in message
2022-08-03 12:05:17 +00:00
hikariatama f7eb19b3f0 1.2.13
- Add `@loader.tag("only_commands")` for watchers. Captures only userbot commands
- Add `@loader.tag("editable")` for watchers. Captures only messages, which can be edited
- Replace token obtainment mechanism with callback instead of inline
2022-08-03 10:47:48 +00:00
hikariatama eb33b70939 1.2.13
- Add support for `# requires` metatag in libraries
- Add support for `# scope: hikka_min` metatag in libraries
- Send stats of libraries, if enabled in `.settings`
- Replace library existence check from source url to classname
- Add `self.inline` to libraries
2022-08-02 23:17:47 +00:00
hikariatama bef9968a74 1.2.13
- Remove stupid db lock in `.e`
- Allow `.security` and `.inlinesec` only to owner by default
2022-08-02 22:29:33 +00:00
hikariatama cc09c8bdde 1.2.13
- Add `@loader.tag("out")` for watchers. Captures only outgoing events
- Add `@loader.tag("in")` for watchers. Captures only incoming events
- Add `@loader.tag("only_messages")` for watchers. Captures only messages (not service events)
- Attempt to fix cached entities mixing up
- Do not update modules in db when secure boot is active
- Refactor members getterr
- Add uptime to `.info`
- Refactor `.help`, add version to single mod help message
- Fix TypeError in `.e` when returning tl class instead of object
2022-08-02 22:24:21 +00:00
hikariatama a460f94a8f 1.2.13
- Patch stats so they correctly recognize links
- Fix bug when `...` is being replaced with `..` (unnecessary prefix escape)
- Add `@loader.tag`
- Add `@loader.tag("no_commands")` for watchers. Ignores commands
- Do not cut off prefix in `message.message`, `message.text` and `message.raw_text`
- Partially rework events processing and dispatching
2022-08-02 16:34:59 +00:00
hikariatama 5a5a5c55b5 Revert "1.2.13"
This reverts commit d00f6960db.
2022-08-02 16:21:37 +00:00
hikariatama d00f6960db 1.2.13
- Patch stats so they correctly recognize links
- Fix bug when `...` is being replaced with `..` (unnecessary prefix escape)
- Add `@loader.tag`
- Add `@loader.tag("no_commands")` for watchers. Ignores commands
- Do not cut off prefix in `message.message`, `message.text` and `message.raw_text`
- Partially rework events processing and dispatching
2022-08-02 16:20:38 +00:00
hikariatama 1413def49e 1.2.12
- Automatically patch reply markup in inline form in the way, that edit stays available anyway
- Do not unload inline form automatically, keep it for 10 minutes instead
- Use `telethon.utils.resolve_inline_message_id` to remove inline unit
- Add `self.request_join`
- Allow developers to declare `client_ready` without arguments
2022-07-27 16:54:58 +00:00
hikariatama 1f6c44e903 Part of v1.2.11 update
Check changelogs for more info
2022-07-16 21:56:43 +00:00
hikariatama 63c6d354ce Part of v1.2.11 update
See changelogs for more info
2022-07-16 09:59:19 +00:00
hikariatama 9ddfef305f Part of v1.2.11 update
See changelogs for more info
2022-07-15 22:04:09 +00:00
hikariatama 308eb29b4e Update changelog 2022-07-14 21:38:10 +00:00
hikariatama 8e3647b45b 1.2.11
- Add support for lib attribute `version` (must be defined BEFORE `init` method)
- Add `self.lookup` to libs
- Add `self.allmodules` to libs
- Add `self.lib_get` to libs
- Add `self.lib_set` to libs
- Add support for hook `on_lib_update` (invoked when library is being updated by new version)
2022-07-14 19:40:38 +00:00
hikariatama 1af82d85b2 1.2.10
- Completely drop fast_uploader support
- Add :method:`utils.import_lib`
- Add protection for :obj:`CheckChatInviteRequest` in forbid_joins
- Add ability to search modules by classname in :method:`self.lookup`
- Add anonymous stats of modules loading (YOU CAN DISABLE THEM IN `.settings`)
- Add telethon objects formatting in `.e`
- Add :obj:`loader.SelfSuspend` to disable module commands and watcher loading, e.g. if library is unavailable
- Add migration native modules db storage from `strings["name"]` to classname. ⚠️ Might break some stuff in the beginning in rare cases
- Fix heroku-specific config error
2022-07-13 18:39:19 +00:00
hikariatama f40a4eba09 1.2.8
- Add automatic webpage bot unblock in heroku waker
- Add secure boot feature
- Update native heroku postgre database saving method
- Add easter egg to `.ping`
- Add platform-specific errors while installing requirements
- Change postgresql column `id` datatype from int32 to int64 + legacy migration
- Change proxypass tunnel behavior - now it only opens on setup and via command `.weburl`
- Lavhost-specific web url
- Meaningful errors in web
- ⚠️ Drop `fast_uploader` support. It will be completely removed in next major update
- Deepsource fixes
- Multiple languages with priority
2022-07-02 22:04:27 +00:00
hikariatama 91db334a89 1.2.7
- Add automatic proxy pass
- Fix --no-web argument parsing
- Fix localization error in updater
- Print out only INFO statements to stdout
- Add rotating file handler (logfile with max 10MB size)
- Show web endpoint on startup if available
- Fix gallery `inline_message_id` error
- Add support for `custom_buttons` in `inline.list`
- Add support for `custom_buttons` in `inline.gallery`
- Smart fast_uploader (Do not use hard download on files smaller than 1 MB)
- Attempt to parse `unit_id` from passed `InlineCall` object in `inline._delete_unit_message`
- Reformatting
- Change typehints
- Show list-like values in formatted way in config
- Properly escape html in config
- Split config to pages and categories (core \ non-core)
- Properly edit dictionary config (iter)
- Properly remove items from series options through built-in configurator
- Remove warning from web by replacing coroutine generation with `functools.partial`
2022-06-17 22:22:30 +00:00
hikariatama 879aefa1ed 1.2.6
- Fix processing of `# scope: hikka_min`
- Add `forbid_joins.py` (to use it, download module from official repo with the same name)
2022-06-12 18:45:02 +00:00
hikariatama e382cbc7a5 1.2.5
- Add additional exit on restart to avoid port block
- Add unloaded module name on `.unloadmod`
- Add `banner_url` config var to `HikkaInfo`
- Add `loader.validators.Hidden`
- Add `websockets` dependency, so users can load hikarichat on Heroku
- Add `reply_markup` kwarg to `utils.answer`. This will automatically add buttons to plain message or edit buttons of inline unit
- Add suggestion to join developer's channel on module load if available
- Add `client.force_get_entity` to bypass Hikka Cacher
- Add clickable link to loaded module message if specified meta developer is channel
- Add support of `action` attributes for buttons ("action": "close", "action": "unload", "action": "answer")
- Add log splitter between different clients of instance (if possible)
- Fix inline events `IndexError`
- Fix text in inline input
- Fix translation issue in HikkaConfig
- Fix `.dump`
- Fix modules list reset if you perform `.dlmod` when userbot is not yet fully loaded
- Update links in README
- Remove nalinor from official repos until new modules appear
2022-06-12 09:46:48 +00:00
hikariatama 7b2dc1c572 Update Changelogs 2022-06-06 16:56:53 +00:00
hikariatama c410f97089 1.2.3
- Add field `action` to inline buttons. You can pass there `close` to close inline form, `unload` to unload it from memory, `answer` & `text` | `show_alert` to answer callback query with message
- Update docstrings in inline to match unified format
- Add surrogate error ignorance in dispatcher
- Fix :obj:`EntityCache` caching username `@None`
- Return :obj:`InlineMessage` in `hikka.inline.gallery.Gallery.gallery`
- Fix typo in docstring
2022-06-03 12:11:49 +00:00
hikariatama 07c3cb15e6 1.2.2
- Update gitignore so git doesn't count shit on heroku
- Visual heroku fixes in updater
- Deepsource fixes
- Add `utils.get_entity_url`, `utils.get_message_link`, `utils.remove_html`, `utils.get_kwargs`
- Disable modules debugging on heroku
- Add `.nonickusers`, `.nonickcmds`, `.nonickchats`
- Update blacklist command docs
- Fix grep removing everything in <...>
- Add `loader.validators.RegExp`
- Automatically convert `None` to empty string \ zero integer etc., if validator is specified
- More meaningful errors in `inline_handler`s
- More meaningful errors in `self.inline.form`, `self.inline.gallery`, `self.inline.list` on user-side
- Allow editing\adding media to form via `call.edit`. Currently supported: `photo`, `file`, `video`, `audio`, `gif`
2022-06-02 16:15:08 +00:00
hikariatama f622bf93c8 Add heroku specific update 2022-06-01 22:27:40 +00:00
hikariatama 071f88db5e 1.2.1
- Add termux specific requirements
- Ignore `heroku3` import error on non-heroku platforms
- Refactor `heroku.py` app searching algorithm
- Refactor postgresql database saving process
- Fix heroku restart message not being edited
- Add heroku waker
- Make `hikka-` app naming optional
2022-06-01 22:14:55 +00:00
hikariatama 5d21fca599 Update version and changelog 2022-05-30 21:56:56 +00:00
hikariatama 89b3295454 Patch, fixing HikkaConfig
- Allow adding and removing multiple items in config
- Add `ast.literal_eval` to config
- Add explicit typecheck for `mod.config`
2022-05-26 08:54:50 +00:00
hikariatama 3fc77b5529 1.1.28
- Fix non-working param `share_link` in loader
- Assure logging bot is a member of logchat
- Do not store partial phone number in session, only ID
- Rework fast uploader so more types can be passed. For more information check code docstrings and typehints
- Rework installer so it properly displays which action is currently happening
- Fix `Series` not accepting one item
- Show upcoming commit in update and warn if update is not required
- Add reset to default button to config
- Merge `hikka_logger.py` with `test.py`
- Localization
- Allow opening options of specific mod via arguments in `.config`
- Add `add` and `remove` buttons to `Series` params
- Do not unload form immediately, if `ttl` param was passed explicitly
2022-05-25 16:32:39 +00:00
hikariatama ec647fe34e 1.1.27
- Reorder the steps of parsing in `loader.validators.Series`
- Fix aliases (yet another time)
- Fix minor bug in `loader.validators.Series`, which allowed to put empty string in it
- Fix some translation issues and type conversion ones
- Fix incorrect modules loading if multiple links end with specified name
- Fix type conversion bug in `loader.validators.String`
- Fix typehints flaws
- Add additional fields to `inline.form`: `gif`, `file`, `mime\_type`, `video`, `location`, `audio`
- Add reset-to-default action, if config is invalid while loading the userbot to prevent fall
- Add verification emoji to `input` to let user know, that new value was processed
- Add badge showing how much the last restart took
- Add `min_len`, `max_len`, `fixed_len` params to `loader.validators.Series`
- Add option to show downloaded module link in result message of `.dlmod`
- Add explicit database save after applying new config
- Add hint to web
- Add code of conduct
- Add changelog
- Remove redundant code in `database.py` as it literally does nothing
2022-05-21 18:34:45 +00:00