Commit Graph

59 Commits (89040b6e2ff8509d42638ed70c0376c2bb5efb06)

Author SHA1 Message Date
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 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 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 ed3b8529d3 Fix typo & Fix AttributeError in `utils.find_caller` 2022-08-09 21:39:13 +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 21d0b5fc45 Deepsource fixes 2022-08-03 17:57:59 +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
Sourcery AI 90163f8cfc 'Refactored by Sourcery' 2022-07-13 20:29:27 +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 fd749d3189 Minor fixes 2022-06-12 17:14:22 +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 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 d0dae477c6 Update README, deepsource fixes 2022-05-31 11:07:13 +00:00
hikariatama 925b1caedd Add GeekTG compat; Continue integrating Heroku 2022-05-28 08:12:36 +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 64163b7218 Add Orange Pi as platform to `utils.get_named_platform` 2022-05-19 19:02:13 +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 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 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 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 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 a3ea19dc58
Minor bug fixes 2022-04-17 10:58:14 +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 db79a8a18f
Compatibilit tweak 2022-04-17 07:06:11 +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 e6336679d7
Add Raspberry Pi recognition to `utils.get_named_platform`. thx to @CakesTwix 2022-04-11 13:21:29 +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 f2ef452acd
Fix `.dlmod`, remove logspam from utils 2022-04-09 12:12:19 +00:00
Hikari 070366b341
1.0.26: Add `utils.smart_split` which splits the message in chunks and relocates entities so they fit. If `utils.answer` response is too large to send in one message, it will be split in chunks and sent using `inline.list` 2022-04-09 11:56:39 +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 03f7c71557 Bug fixes and refactorment 2022-04-03 11:01:05 +00:00
hikari.ftg 94a7bdc221 Hotfix 2022-04-02 20:33:46 +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 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 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