Commit Graph

459 Commits (568d9d5bd0702aeca56af63aea922f6d189f9ace)

Author SHA1 Message Date
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 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 ac6655edcc 1.3.2
Replace error type
2022-08-15 17:37:19 +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 1c161417cd - Fix `.info` for some users
- Fix inline lists for `.help` and other commands, which include animated emojis
2022-08-14 22:03:55 +00:00
hikariatama 8b04707353 Fix tags error in aiogram 2022-08-14 21:38:42 +00:00
hikariatama 99f834e4dd Fix strings 2022-08-14 21:34:50 +00:00
hikariatama a71b1ca4c9 1.3.1
- Add toggle for custom emojis
2022-08-14 20:35:45 +00:00
hikariatama 8f3debaadb 1.3.1
- Bring more animated emojis to core modules
2022-08-14 20:15:15 +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 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 a4b6125618 `Black` refactored 2022-08-03 18:50:28 +00:00
Sourcery AI 59fab0a092 'Refactored by Sourcery' 2022-08-03 18:03:12 +00:00
hikariatama 21d0b5fc45 Deepsource fixes 2022-08-03 17:57:59 +00:00
hikariatama 7b0cd6e32d 1.3.0
- Fix typo in hikka_config
2022-08-03 17:43:08 +00:00
hikariatama 1af726b4b5 1.3.0
- Update quickstart
- Fix minor bugs
2022-08-03 16:20:25 +00:00
hikariatama bd5aaa1082 Increase reaction delay in order to prevent floodwaits 2022-08-03 14:46:39 +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 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 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 0cd4d619c3 Fix inner entities in HikkaInfo for default config 2022-07-27 18:33:52 +00:00
hikariatama e70086f67b Fix `{upd}` tag in HikkaInfo (do not wrap it into entities) 2022-07-27 18:31:47 +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 f46b81ddce Add `await` to folder adder in Updater 2022-07-19 20:37:26 +00:00
hikariatama e477a07147 Black formatting after sourcery fixes 2022-07-19 20:32:22 +00:00
Sourcery AI c7bea2a5e0 'Refactored by Sourcery' 2022-07-19 20:29:32 +00:00
hikariatama 9d88819cb5 Deepsource fixes 2022-07-19 20:22:43 +00:00
hikariatama 8b632fdbd2 Part of v1.2.11 update 2022-07-19 16:37:12 +00:00
hikariatama 1f6c44e903 Part of v1.2.11 update
Check changelogs for more info
2022-07-16 21:56:43 +00:00
hikariatama 6637977f0c Part of v1.2.11 update
- Remove Database and TelegramClient from local variables in stack
- Remove redundant parameters in `send_ready_one` and similar
2022-07-16 10:24:15 +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
Sourcery AI 90163f8cfc 'Refactored by Sourcery' 2022-07-13 20:29:27 +00:00
hikariatama 5dd942992e Fix multiple spaces in `.help -f` for modules without commands 2022-07-13 20:26:10 +00:00
hikariatama 3b18c068fb Show actual module name in <core>, <file> and <string> origins 2022-07-13 20:16:35 +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 5c4fba228a Patch for Updater 2022-07-06 19:25:50 +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 fd749d3189 Minor fixes 2022-06-12 17:14:22 +00:00
hikariatama 212a1a3f59 Suppress any exceptions on web stop 2022-06-12 15:25:10 +00:00
hikariatama 7e5b9ad58d Patch
- Fix non-working inline in `.logs`
- Fix unit deletion via "action" attr
- Fix module load error, if invalid entity was specified in #meta developer
- Hopefully fix config
- Remove notification about setattr error in dispatcher
2022-06-12 15:23:48 +00:00
hikariatama 19ebbe85a0 Fix false hidden config 2022-06-12 10:25:55 +00:00
hikariatama 966ea0979a Fix inline, migrate to new close handlers 2022-06-12 10:20:45 +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 491a3b3f37 [minor] Replace imgur link with github 2022-06-09 22:08:27 +00:00
hikariatama 07970bbcdf Patch for loader 2022-06-07 16:51:52 +00:00
hikariatama ac8e7371e9 1.2.4
- Show current options in module config
- Add new validators: `loader.validators.Union`, `loader.validators.NoneType`
2022-06-06 16:54:31 +00:00
hikariatama 3725d6ed25 Patch
- Add additional Heroku deps
- Fix `load_module` reattempt
2022-06-05 17:24:18 +00:00
hikariatama 1374ddb09a Make `redis` optional for non-heroku users 2022-06-05 16:44:53 +00:00
hikariatama 534fb32c2a Heroku Patch
- New Heroku dependencies list in Pipfile
- External Redis database support
- Mask more options in logs and .e output
- Remove psycopg2 from requirements.txt
2022-06-05 16:30:16 +00:00
hikariatama 30542381a8 Revert "[DO NOT INSTALL] - Testing Heroku-redis migration"
This reverts commit 18a0dac15d.
2022-06-05 13:34:14 +00:00
hikariatama 18a0dac15d [DO NOT INSTALL] - Testing Heroku-redis migration 2022-06-05 13:17:12 +00:00
hikariatama dc7434e036 Patch
- New installation banner
- Add automatic blob->raw convertion in loader
2022-06-05 12:58:08 +00:00
hikariatama a37263a5d8 Addition to latest commit 2022-06-02 22:31:07 +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 30e26fe117 Add ts to logs, refactor logging unit 2022-06-01 23:45:45 +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 9873cc50c9 Update installation script. Hide session and postgresql in eval 2022-05-31 12:36:32 +00:00
hikariatama d0dae477c6 Update README, deepsource fixes 2022-05-31 11:07:13 +00:00
hikariatama e529165c37 Patch for help and heroku
- Show modules without commands in `.help -f`
- Update `app.json`
2022-05-31 10:27:41 +00:00
Sourcery AI b85bdc3b26 'Refactored by Sourcery' 2022-05-30 21:35:09 +00:00
hikariatama 0db5607e49 Fix Heroku restart 2022-05-30 21:25:06 +00:00
hikariatama 1e7c0201d9 Heroku multiple accounts database, fixes 2022-05-30 20:58:20 +00:00
hikariatama 867f2c542d Fix heroku session saving flow 2022-05-30 19:59:13 +00:00
hikariatama 1288220c3f Rework session reading mechanism 2022-05-30 17:17:49 +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 46fe403fae Replace huge mess of memory dicts with a single `_units` one, fix `TelegramID` validator 2022-05-26 16:59:39 +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 a0aacf459e Hotfix for broken `hikka_info.py`
Bug occured of you tried to open config after loading module from file
2022-05-21 18:49:25 +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 059d531d39 1.1.24
- Add `String` and `Link` validators
- Fix `Series` validator
- Reformat core modules to use validators
2022-05-19 19:26:03 +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
hikariatama 90b5ab0b4d Minor updates
- Update dockerfiles
- Update readme
- Suppress some logging shit
- Hopefully fix dl buttons
- New banner in info
2022-05-18 18:37:43 +00:00
hikariatama 96afa2fb33 Minor fixes
- Add additional config options to `HikkaInfo`
- Delete all update messages in update notifier
2022-05-16 15:41:15 +00:00
hikariatama 8f5e879dc4 Minor bugfixes
- Make uvloop optional
- Fix `utils.escape_html`
- Add nickname check when creating bot (less than 64)
- Add banner in `.info`
2022-05-16 05:37:58 +00:00
Sourcery AI 9a0a5a5543 'Refactored by Sourcery' 2022-05-14 20:44:57 +00:00
hikariatama a6d01c6cdb 1.1.22
- Fix bugs related to web, more specifically: Session save timing, adding more than 1 account and proper restart
- Rework Dockerfiles so they work properly
- Add `uvloop` so the asyncio runs faster
- Add `Docker` badge to info
- Improve Okteto performance by adjusting settings in `okteto-stack.yml`
- New ascii_faces in utils
- Typehints update
- Fix Okteto pinger messages removal
2022-05-14 17:46:52 +00:00
hikariatama 5aad62610c Update Dockerfiles, prepare core modules to work with Docker properly 2022-05-13 16:09:21 +00:00
hikariatama 9cd320e91e 1.1.21
- Fix translation typos
- Add nonick suggestion when adding user to group
- Add entity caching
2022-05-12 18:42:53 +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 3599d260cd Fix updater 2022-05-08 20:03:12 +00:00
hikariatama 14b15b65e8 Add ignorance of modules links case 2022-05-08 19:52:53 +00:00
hikariatama 94822ef54a Add error handlers to core modules 2022-05-08 19:40:43 +00:00
hikariatama 9a070479de Minor fixes 2022-05-07 21:59:30 +00:00
hikariatama 15075282d6 Add message processor 2022-05-07 19:41:26 +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 2b1799492a Revert "Add lavHost-specific restart and update processors"
This reverts commit 3735d668bd.
2022-05-06 17:26:00 +00:00
hikariatama 3735d668bd Add lavHost-specific restart and update processors 2022-05-06 17:23:21 +00:00
hikariatama 334643178c 1.1.15
- Add automatic database autofix and rollback if database was broken by module
- Fix translation issues
- Warn user, if he tries to view .help when userbot is not yet fully loaded
- Create alias for `_generate_markup` (`generate_markup`)
- Fix modules which are deleting from helphide
- Automatically save db if it was edited via classic dictionary methods
2022-05-06 12:13:01 +00:00
hikariatama b33d823056 Add self.lookup; Fix config message parsing; Fix hikka-backups pfp 2022-05-05 18:06:40 +00:00
hikariatama 526df8532f Create hikka folder only once 2022-05-05 17:51:18 +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 05a92a9be7 Remove link prefix on primary repo modules 2022-05-04 17:44:29 +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 b7a69b4a72 Bulk localization 2022-05-03 13:54:47 +00:00
hikariatama 440092e690 Fix LoadError handling 2022-05-02 15:55:58 +00:00
hikariatama 5ef3647643 Make API Protection optional 2022-05-01 06:38:44 +00:00
hikariatama 855379bd75 Add restart lock on protection, add protection from protections' flood in bot 2022-05-01 06:32:36 +00:00
hikariatama 70719ac6eb Increase threshold 2022-04-30 21:51:49 +00:00
hikariatama a5b7dcb8dc Add API protection 2022-04-30 21:41:44 +00:00
hikariatama 02fd9ad602 Fix some stuff for deepsource 2022-04-29 17:57:56 +00:00
hikariatama df3a2befd3 1.1.10: Add ability to download modules from additional repos (e.g. .dlmod weather) 2022-04-29 07:07:54 +00:00
hikariatama db9edf8d75 Fix HikkaDL as mentioned in https://github.com/hikariatama/Hikka/issues/13 2022-04-28 11:55:58 +00:00
Hikari 8c02fd5b1d
1.1.9: Fix `_generate_markup` (hooks setup), add `switch_inline_query|current_chat` parsers 2022-04-26 13:40:40 +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 185457140d Minor fixes 2022-04-23 21:34:48 +00:00
Hikari afaeea5ab7
Add comparsation link to update notifications 2022-04-23 15:15:22 +00:00
Hikari 81f7cfeda6 Fix attr error `_find_data_channel` 2022-04-23 15:08:17 +00:00
Hikari 1b846a6e1b
Return best match if no full-match occurred in `.help` 2022-04-23 12:30:37 +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 4bd1d302fa
1.0.7: Add `self.animate` function to all modules, which allows you to easily create fancy animations 2022-04-23 11:26:14 +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 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 6b1d20d0f8
Add ability to disable automatic backups 2022-04-15 09:39:41 +00:00
Hikari 74ae9ecb57
Add automatic database backup (`HikkaBackup`) 2022-04-15 09:30:34 +00:00
Hikari 22c260492a
Add `.nonickchat` command to HikkaSettings
You can enable NoNick for certain chat in order to avoid userbot spam in not-needed chats
2022-04-15 08:01:58 +00:00
Hikari a930e85678
Allow user to control callback buttons (forms) security via `.security` command 2022-04-15 07:44:59 +00:00
Hikari c6b03249e8
Update `cache_time` in native query answers so they are not cached anymore 2022-04-14 17:56:50 +00:00
Hikari c98a9f610b
Automatically confirm update if it was initiated via the button in update notifier 2022-04-14 09:25:26 +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
Hikari 748f51351f 1.0.28: Add `silent` param to lists, forms and galleries; Add `photo` param to inline form
Add URL validator to `inline._generate_markup`, which will ignore buttons with invalid urls
2022-04-13 17:15:00 +00:00
Hikari f4761b91de
Add CakesTwix to allowed origins
There was no https://twix.nonfalse-networks.net.ua/modules, which have been forbading to install modules from this origin via buttons
2022-04-12 13:08:06 +00:00
Hikari fdef2634de
Fix weird bug with un-translated modules due to invalid `__module__` 2022-04-09 12:46:51 +00:00
Hikari f2ef452acd
Fix `.dlmod`, remove logspam from utils 2022-04-09 12:12:19 +00:00
hikari.ftg f76db91648 1.0.25: Add `disable_security` param to forms, galleries, lists and query galleries. Clean up code a lil bit 2022-04-08 12:26:42 +00:00
hikari.ftg bf4098339d Deepsource fixes 2022-04-07 18:01:20 +00:00
hikari.ftg 817eda537b Okteto fixes 2022-04-07 16:41:15 +00:00
hikari.ftg f19c40bbef `utils.dnd`, which silence the peer and archives it (especially good for bots, which are used to obtain tokens), automatically silence the @hikka_userbot, @botfather and others. Update typehints in utils 2022-04-07 16:29:59 +00:00
hikari.ftg 045fcf4323 Migrate from string formmating to f-strings in logging 2022-04-07 16:15:26 +00:00
hikari.ftg 4e87ebd3c2 1.0.24: Refactor security, fix security for groups, remake module storage system with legacy db migration 2022-04-07 15:50:13 +00:00
hikari.ftg 556a52b2fb Omit case when unloading module 2022-04-07 13:33:54 +00:00
hikari.ftg 3cf750a586 Attempt to install dependencies from error message if they are not specified in code 2022-04-07 13:27:33 +00:00
hikari.ftg 737dfd8343 Add modules' creators propriety gesture to HikkaDL (Automatic reaction when downloading via button) 2022-04-07 11:17:10 +00:00
hikari.ftg bd6f35878d 1.0.23: Add ability to disable HikkaDL natively, add support for non-inline mode for Updater 2022-04-07 10:54:16 +00:00
hikari.ftg 0139b7bd9c Automatically revoke HikkaAPI token if it expires \ becomes invalid 2022-04-07 09:14:27 +00:00
hikari.ftg db14892ce2 Add requirements 2022-04-06 19:09:20 +00:00
hikari.ftg 050ac0ea4f 1.0.22: Add HikkaDL module to use download buttons 2022-04-06 19:05:31 +00:00
hikari.ftg 8181ae56f4 UpdateNotifier translateability 2022-04-06 06:10:29 +00:00
hikari.ftg 29784d2e0d Delete last update notification when new one is upstrea 2022-04-06 06:03:19 +00:00
hikari.ftg 1cd3302c9c Cool updater (test) 2022-04-05 19:10:52 +00:00
hikari.ftg 25ae14de28 Fix `_bot_username` attribute error 2022-04-05 18:53:13 +00:00
hikari.ftg 179f12d9ca 1.0.21: A lot of stuff: web fixes, bug fixes, automatic seamless userbot restart when adding new account in web, replace emojies, add inline list feature, fix `types` name conflict and I don't remember other fixes, read code 2022-04-05 16:46:03 +00:00
hikari.ftg 708639d7f2 Fix UpdateNotifier 2022-04-03 17:34:59 +00:00
hikari.ftg 467c093a26 Upload UpdateNotifier 2022-04-03 17:30:17 +00:00
hikari.ftg 273c3d6561 Remove Okteto debugging 2022-04-03 17:14:40 +00:00
hikari.ftg 764b158e91 Add `.hikkainfo` cmd 2022-04-03 16:52:45 +00:00
hikari.ftg 60fe788d2e 1.0.20: Allow passing `reply_markup` field to inline result. Allow passing only dict or only one embeded list with dicts, if you don't need a lot of lines of buttons 2022-04-03 16:17:54 +00:00
hikari.ftg 15bc667860 Minor bug fixes 2022-04-03 10:45:08 +00:00
hikari.ftg 495ef51acd Replace misswritten license 2022-04-02 20:16:45 +00:00
hikari.ftg 17e9e362d4 1.0.18: Add `silent` and `archive` params to `utils.asset_channel`. Remake logging so it become native with `BotLogger`. Inject `BotLogger` analog directly 2022-04-02 20:14:24 +00:00
hikari.ftg 288ac55c85 Add possibility to change bot username via `.ch_hikka_bot` 2022-04-01 22:04:12 +00:00
hikari.ftg a0e9586506 1.0.17: Add ability to set up inline commands' security map (only `owner`, `sudo`, `support` and `everyone`, because other permissions are inaccessible when processing inline query). Add database serializeability check to avoid JSON-serialization problems if unserializable object is being stored in db. Minor bugfixes 2022-04-01 20:51:35 +00:00
hikari.ftg 4583c98c1f Hotfix for Okteto users 2022-04-01 20:15:37 +00:00
hikari.ftg becec46e97 Ignore events to avoid errors in logs 2022-04-01 19:19:43 +00:00
hikari.ftg 0075802a63 1.0.16: Full support of Okteto cloud deployment inculding persistent data storage (additional volume is created), automatic waker for container and other stuff 2022-04-01 19:15:47 +00:00
hikari.ftg f22c811bfe Updates for Okteto 2022-04-01 17:09:00 +00:00
hikari.ftg 4222ea5840 When userbot is installed to Okteto, store persistent data in `data` folder 2022-04-01 12:49:56 +00:00
hikari.ftg fca9f44e07 Localization features 2022-03-31 18:45:26 +00:00
hikari.ftg c40b8e016e 1.0.13: Include command prefix in inline `info`. Fix `--no-web`. Suggest to save modules to filesystem 2022-03-31 18:24:00 +00:00
hikari.ftg 6dfaaebf0d Fix `query_gallery` permissions 2022-03-31 13:03:14 +00:00
hikari.ftg 0a2327c37e 1.0.11: Add `inline.query_gallery` to add ability to call inline gallery via inline query. Add `e404` attribute to `InlineQuery`, which will show, that no results were found 2022-03-29 11:14:20 +00:00
hikari.ftg 2b55fde4e8 Add protection from update loop 2022-03-28 10:25:34 +00:00
hikari.ftg c8059cd604 1.0.9: Full inline structure rework. Split this madness into separate modules (`InlineUnit`s), which extend the main unit - `InlineManager`. Compatibility layer is not main priority. Some modules will break after updating to 1.0.9 2022-03-28 09:10:31 +00:00
hikari.ftg 5bc8359590 1.0.8: Code refactoring, minor bug fixes, rewrite security 2022-03-28 08:19:31 +00:00
hikari.ftg 66997edfbd 1.0.7: Massive inline galleries update, memoization, back button, preloading and other features. Fix some minor bugs, add `ascii_face` to utils 2022-03-27 21:27:59 +00:00
hikari.ftg 3fde53f5f4 1.0.6: Add welcome message, triggered on userbot is installed 2022-03-27 17:52:36 +00:00
hikari.ftg b98b930c81 Deepsource fixes 2022-03-27 15:33:18 +00:00
hikari.ftg 4c68b2aebb Deepsource fixes 2022-03-27 15:06:15 +00:00
hikari.ftg b95887e20c 1.0.4: Add Okteto pinger, which will wake the pod up, when it goes to sleep 2022-03-27 13:19:29 +00:00
hikari.ftg 3985152b84 Minor bug fixes. Base for okteto pinger support 2022-03-27 12:40:52 +00:00
hikari.ftg 1d940b2b7f Digging and re-digging code 2022-03-26 23:10:09 +00:00
hikari.ftg b499c4ab1d Minor bug fixes 2022-03-26 21:18:28 +00:00
hikari.ftg f1171e2683 Fix a lot of stuff in web, add a lot of new features to web, merge root and initial_root, remove trailing whitespaces and other sutff 2022-03-24 13:59:16 +00:00
hikari.ftg a40fd0b1ec Continue refactoring stuff, removing redundant (IMHO) code, fix core modules; Added sub-license for edited files 2022-03-23 18:48:26 +00:00
hikari.ftg 34d58b5342 Full restructure of core code, refactor web, create new active bg 2022-03-23 17:38:35 +00:00
hikari.ftg 0112296998 Remove redundant backuper as it is available in classic repo, add okteto badge in info 2022-03-22 17:51:55 +00:00
hikari.ftg 6b96d4334f Move stylesheets from web to static, replace avatar, fix some shit 2022-03-22 15:55:41 +00:00
hikari.ftg 041960117f Continue fixing stuff; Add okteto support (manual build as far) 2022-03-22 15:03:50 +00:00
hikari.ftg 270ff31da0 Update utils list, add geek compat layer 2022-03-22 13:09:00 +00:00
hikari.ftg 7ad89e4995 Update installer 2022-03-21 12:55:31 +00:00
hikari.ftg e761b73a41 Continue development 2022-03-21 08:59:49 +00:00
hikari.ftg ef95f77789 Initial commit 2022-03-21 05:57:25 +00:00