Commit Graph

133 Commits (9ac55365cda872cff46138e766e956a014adc94a)

Author SHA1 Message Date
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 6ebfa3e0d7 Fix empty reply markup patcher 2022-07-27 17:54:55 +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
Sourcery AI c7bea2a5e0 'Refactored by Sourcery' 2022-07-19 20:29:32 +00:00
hikariatama 8b632fdbd2 Part of v1.2.11 update 2022-07-19 16:37:12 +00:00
hikariatama 08443aa775 Part of v1.2.11 update
Check changelogs for more info
2022-07-16 21:55:45 +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
hikariatama 66426025e0 Patch with minor fixes
- Refactorment
- Deepsource suggestions
- License update
2022-07-07 20:24:20 +00:00
hikariatama 402ed878c6 1.2.9
Small fixing, which allows developer to specify audio metadata in form and `_edit_unit`
2022-07-03 14:41:58 +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 12ae1ec44d Patch
- Temporarily disable `fast_download` and `fast_upload` (no need to remove them from code, they are available as-is, but use legacy transfer
- Fix gallery loop
2022-06-19 19:19:38 +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 6f7fde5e6a Temporarily remove ttl check in inline units to fix config 2022-06-12 17:30:37 +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 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 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 d5dedf7f4c Patch
- Fix inline list close button
- Fix `disable_notifications` param in `update_notifier.py`
- Minor core code naming
2022-06-02 22:29:44 +00:00
hikariatama 0138fe15db Fix typo 2022-06-02 16:22:38 +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 71682ba8a1 Add `.mp4` to allowed animated media types of gallery 2022-05-26 17:07:27 +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 280a97cb2b Attempt to guess media file type in gallery (gif/image) 2022-05-26 16:31:20 +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
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 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 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
hikariatama 4340e363c7 Fix typo 2022-05-09 20:10:49 +00:00
hikariatama 9a070479de Minor fixes 2022-05-07 21:59:30 +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 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 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
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 d74aaa99fd
Remove weird "-> None" typehints, idk why I left them for so longs 2022-04-23 12:12:52 +00:00
Hikari d3144fcebd
1.0.6: Add `callback`s to inline query answers 2022-04-23 04:41:51 +00:00
Hikari 74e6bbdad6
1.0.5: Allow to pass `disable_security` and `always_allow` to buttons directly for use in inline queries 2022-04-23 04:20:44 +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 a3ea19dc58
Minor bug fixes 2022-04-17 10:58:14 +00:00
Hikari 5b7a869f26
Fix fantom message with exception when trying to raise MessageNotModified 2022-04-16 20:29:41 +00:00
Hikari fa1ff8527a
Remember inline_message_id of form in case it gets unloaded before the result is returned 2022-04-16 20:27:13 +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 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 df3c684a43
Refactor inline security, replace weird two-level generator with for-loop and generator, fix galleries 2022-04-14 09:09:05 +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 eea3d2f3e5 1.0.27: New requirement - grapheme. New `utils.smart_split`, authored by t.me/bsolute. Minor improvements 2022-04-10 21:44:20 +00:00
Hikari aa34046f27
Fix loading status messages for forms, galleries and lists 2022-04-09 12:30:46 +00:00
Hikari dc16e406ff
Fix when answering inline query via native method 2022-04-09 08:04:51 +00:00
Hikari bf6297388e
Fix markup 2022-04-08 16:06:55 +00:00
Hikari d0b63e4798
Fix some typos 2022-04-08 13:52:01 +00:00
hikari.ftg 19da41bcbc Fix `.unloadmod`, allow to edit forms `disable_security` on `call.edit` 2022-04-08 12:43:26 +00:00
hikari.ftg c49b03bfea Update docstrings 2022-04-08 12:35:36 +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 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 29784d2e0d Delete last update notification when new one is upstrea 2022-04-06 06:03:19 +00:00
hikari.ftg c0a101bdc2 Some fixes 2022-04-05 18:07:23 +00:00
hikari.ftg 93e44db8e7 Minor bug fixes 2022-04-05 17:38:43 +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 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 759ff3ef16 1.0.19: Allow developers to return InlineQuery result via `dict` \ list of `dict`s. Move query gallery to a separate module 2022-04-03 15:46:32 +00:00
hikari.ftg 15bc667860 Minor bug fixes 2022-04-03 10:45:08 +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 a5497fdf9d 1.0.15: Add more errors to `query` aka `query.e500()` 2022-03-31 20:44:56 +00:00
hikari.ftg 1fc0b26e66 1.0.14: Add gallery slideshow 2022-03-31 20:27:57 +00:00
hikari.ftg 0d5ea045fd Actual 1.0.12 with changes 2022-03-31 11:33:21 +00:00
hikari.ftg 3d4be0b77b 1.0.12: Optimize forms, galleries and custom_map storage by ommiting keys with default values and dynamically generate them. Add feature to inherit command-caller permissions on form and gallery (crutchy). Minor improvements and bug fixes 2022-03-31 11:13:31 +00:00
hikari.ftg 2c15341cf5 Update README 2022-03-29 12:38:13 +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 12d833d0dd Update README.md, minor fixes 2022-03-28 21:47:30 +00:00
hikari.ftg cf22d576f0 1.0.10: Add feature to send gifs in inline galleries (`gif` param). Make argument `caption` of inline gallery not mandatory 2022-03-28 18:26:33 +00:00
hikari.ftg d9670713df Add GeekTG backward compatibility layer 2022-03-28 15:50:22 +00:00
hikari.ftg 41883cda61 Fix InlineQuery override 2022-03-28 11:21:34 +00:00
hikari.ftg 3e2bd4494a Deepsource fixes 2022-03-28 11:06:47 +00:00
hikari.ftg 01a4d11432 Add gallery floodwait handler 2022-03-28 10:38:50 +00:00
hikari.ftg 5ea353d8c9 Automatically switch to the next photo without showing warning if fetch error occurred 2022-03-28 09:43:57 +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