Commit Graph

78 Commits (8e3647b45bfc3448531c07b77bd46b698a16e67a)

Author SHA1 Message Date
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
Sourcery AI 90163f8cfc 'Refactored by Sourcery' 2022-07-13 20:29:27 +00:00
hikariatama 3b18c068fb Show actual module name in <core>, <file> and <string> origins 2022-07-13 20:16:35 +00:00
hikariatama 633845f8d6 Add key-specific config and dictionary migration 2022-07-13 19:54:45 +00:00
hikariatama 5fe75d3af7 Rename duplicate variable which caused error on migration 2022-07-13 19:43:41 +00:00
hikariatama 7994b82566 Forcefully override new db values with legacy ones 2022-07-13 18:51:03 +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 66426025e0 Patch with minor fixes
- Refactorment
- Deepsource suggestions
- License update
2022-07-07 20:24:20 +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 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 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 925b1caedd Add GeekTG compat; Continue integrating Heroku 2022-05-28 08:12:36 +00:00
hikariatama 692402a8ea Add heroku-specific stuff 2022-05-28 07:39:24 +00:00
hikariatama 6cde31579f Testing Heroku deployment 2022-05-28 07:26:31 +00:00
hikariatama a837428cea Remove `HikkaDL` as redundant 2022-05-26 18:07:13 +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 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
hikariatama 34bbb44a3a 1.1.26
- Hopefully finally fix aliases being reset after restart
- Remove redundant internal hook `_client_ready2`
- Show user evaluated version of config value instead of pre-comp one
- Add validator for each item to `Series`, remove `separator`
- Add new validator: `TelegramID`
2022-05-20 19:02:27 +00:00
hikariatama eae0c413f0 1.1.25
- Add separate messages on `restart` and `full_restart`. Second one is shown, when all modules are loaded
- Replace `.uninstall_hikka` with full uninstallation (remove bot, asset chats and folder)
- Clean code
- Suggest update if it is required by module
- New validator: `Float`
- Buttons in `.config` of option is a boolean value
- Drop support of argument `positive` in `loader.validators.Integer` as it can be easily replaced with `minimum=0`
- Update semantic generator in validators
- Yet another protection from monkey-patching
2022-05-20 13:42:39 +00:00
hikariatama 3453fb9886 Hotfix for those who issued userbot fall with incorrect config set 2022-05-19 20:40:14 +00:00
hikariatama 6caa7a0e4e 1.1.23
- Add config validators (`loader.validators`, `Boolean`, `Integer`, `Choice`, `Series`)
- Change info layout
- Add `.uninstall_hikka`
- Add `.clearlogs`
- Refactor code
- Fix minor bugs
- Fix aliases being reset after restart (aliases will now be available only when userbot is fully loaded)
2022-05-19 18:55:37 +00:00
Sourcery AI 9a0a5a5543 'Refactored by Sourcery' 2022-05-14 20:44:57 +00:00
hikariatama 5aad62610c Update Dockerfiles, prepare core modules to work with Docker properly 2022-05-13 16:09:21 +00:00
hikariatama cee6783191 Patch, fixing legacy fs modules migration 2022-05-12 15:37:05 +00:00
hikariatama e713035099 1.1.20
- Add legacy fs modules migration
- Add `ready` asyncio Event to help track userbot loading process from outside
- Replace logging in loader with module-dependent one
- Fix some bugs and bug-rist issues
- Refactor code
- Send big logs as file, rather than an infinite series of messages
- HTML-escape `# meta developer:`
- Make `self.animate` available for core modules and modules, loaded from file
2022-05-11 17:46:36 +00:00
hikariatama 0893947d2c 1.1.19
- Fix infinite loops
- Add client-specific check of fs modules
- Use classname of module, if it is possible to parse it with ast
- Rework infinite loops stopping and modules instance placement
2022-05-11 11:28:10 +00:00
hikariatama 3d9d243d1b 1.1.18
- Add notification about not exact match in help
- Add automatic progress bar generation to `self.fast_upload` and `self.fast_download`
- Make `Mod` ending in modules class name not mandatory
2022-05-09 18:14:58 +00:00
hikariatama 9a070479de Minor fixes 2022-05-07 21:59:30 +00:00
hikariatama b282bee88d 1.1.17
- Fix some weird looking code
- Fix some emojies and translation issues
- Add native lavHost support (.restart, .update) via internal API
- Add utils.get_lang_flag()
2022-05-07 19:38:52 +00:00
hikariatama ed686343bb 1.1.16
- Fix config docstrings and html escaping
- Fix typehints
- Fix some security staff
- Add additional bot username check
- Add additional foolchecks
- Migrate to walrus operator where necessary
- Remove redundant code block
- Add default aiogram parse mode
- Rename some core stuff which was not supposed to be used by external developers
2022-05-07 16:40:29 +00:00
hikariatama b33d823056 Add self.lookup; Fix config message parsing; Fix hikka-backups pfp 2022-05-05 18:06:40 +00:00
hikariatama c7dfb35270 1.1.14
- Fix utils.asset_channel()'s archive param
- Fix defect, which forced installation from additional trusted repo, rather than from primary one if the file names are matched
- Add avatar to utils.asset_channel() which automatically sets chat pic on creation (be careful, bc it leads to floodwaits, if you do it often)
- Add automatic hikka folder processing
- Add avatars to all official repo modules, which require asset chats (and add them to hikka folder)
- Rework database assets chat processing
- Replace some minor stuff like texts and emojies
- Force many core modules to use self.get\self.set rather than digging the db
- Add .fconfig command to forcefully set known config value if it doesn't fit in Telegram query
- Add dataclasses for module config (read the docs for more info), bc old way is blasphemy
- Automatically save config value if it was set to module self.config[option] = value
- Add utils.is_serializable(), utils.set_avatar()
- Send very large (over 4096*10 symbols) output in a file rather than in an inline list
2022-05-05 17:39:09 +00:00
hikariatama d7428880e1 Fix commands parsing 2022-05-04 17:32:07 +00:00
hikariatama 1b96f8f8cc 1.1.13: Fix bugs, clean code, replace redundant methods. More info in t.me/hikka_ub 2022-05-04 17:18:45 +00:00
hikariatama d2d7674575 1.1.12: Add modules' attr `self._tg_id` which represents the client id 2022-05-01 06:52:18 +00:00
hikariatama b411d5156e 1.1.11: Add fast uploader, update translations 2022-04-30 15:10:56 +00:00
hikariatama 02fd9ad602 Fix some stuff for deepsource 2022-04-29 17:57:56 +00:00
Hikari f56a380fc6
1.1.8: Add `on_dlmod` hook, fix translations, fix okteto pinger and some minor stuff
More info in t.me/hikka_ub
2022-04-25 13:10:34 +00:00
Hikari d503def592
Hopefully fix origin of core modules 2022-04-23 12:40:52 +00:00
Hikari d74aaa99fd
Remove weird "-> None" typehints, idk why I left them for so longs 2022-04-23 12:12:52 +00:00
Hikari 791f1d1774
Make core modules loader data accessible via inspect 2022-04-23 12:09:12 +00:00
Hikari f4f7e8e0b9
1.1.4: `utils.get_git_hash()`, fix stuff, add debugging mode for modules. For more info check t.me/hikka_ub 2022-04-22 12:51:17 +00:00
Hikari c4501a5a4a
1.0.3: Finally (hopefully) fix config 2022-04-18 13:20:12 +00:00
Hikari 20992a7d43
1.1.2: Add `@loader.loop` in order to provide developers native and easy access to inifite loops 2022-04-17 15:59:54 +00:00
Hikari 60f104f542
Save config values at mod config, rather than in __module__ 2022-04-17 11:39:13 +00:00
Hikari d064cfeaf3
Minor bug fixes
Move `skip_hook` check before re-assigning strings, add Nonetype check close
2022-04-17 11:14:39 +00:00
Hikari 2d525ab6b0
1.1.1: Finally drop Uniborg and Raphielgang compatibility layer, refactor code a bit, fix minor bugs
This layer was needed 2 yrs ago, when FTG was starting and there were no modules. Right now, there are much more modules for FTG\GeekTG\Hikka, rather than for Uniborg and Raphielgang, so I decided to drop this layer, bc it is very large amount of code and kinda useless right now
2022-04-17 08:52:43 +00:00
Hikari 69c64072c3
1.1.0: First major update. A LOT OF STUFF. Really, a lot. Check out hikka channel for more info 2022-04-16 20:00:15 +00:00
Hikari 21d9133d30
1.0.29: Add `@loader.inline_everyone`
This can be used underneath inline handlers and callback handlers to control default permission rules. Don't forget to set up an inline security mask in `.inlinesec`, otherwise some modules could become unusable
2022-04-13 17:59:55 +00:00