hikariatama / Hikka

The most fresh and updateable developer-oriented Telegram userbot
https://hikka.pw
GNU Affero General Public License v3.0
318 stars 516 forks source link

Hikka Modules Bugs #43

Closed anon97945 closed 1 year ago

anon97945 commented 2 years ago

should be : if self.config["ignore_blocked"] or self.config["silent_blocked"]:

instead of: if self.config["ignore_blocked"]

https://github.com/hikariatama/ftg/blob/af63c0c9c2459adf019465a9e5fa2c86747cbf08/silent_tags.py#L167

IMG_20220607_210056_816

anon97945 commented 2 years ago
🚫 [ERROR] hikka.modules.inline_spotify: BRUH
Traceback (most recent call last):
  File "https://mods.hikariatama.ru/inline_spotify.py", line 157, in inline_iter
    any(uid == i.unit_uid for i in self._active_forms)
  File "https://mods.hikariatama.ru/inline_spotify.py", line 157, in <genexpr>
    any(uid == i.unit_uid for i in self._active_forms)
AttributeError: 'InlineMessage' object has no attribute 'unit_uid'
anon97945 commented 2 years ago
hikariatama commented 2 years ago

activists | it doesn't count self in groups.

Not a bug. It's intended behavior to not count admins. I'll make a config value to add ability to change this

hikariatama commented 2 years ago
anon97945 commented 2 years ago
  • [x] silent_tags.py | properly handle messages from channels

from telethon.tl.types import Message, Channel

https://github.com/hikariatama/ftg/blob/master/silent_tags.py#L22

        if (
            (
                self.config["whitelist"]
                and message.sender_id not in (self.config["silent_users"] or [])
                or not self.config["whitelist"]
                and message.sender_id in (self.config["silent_users"] or [])
            )
            or self.config["silent_blocked"]
            and message.sender.id in self._blocked
            or (
                self.config["whitelist"]
                and utils.get_chat_id(message)
                not in (self.config["silent_chats"] or [])
                or not self.config["whitelist"]
                and utils.get_chat_id(message) in (self.config["silent_chats"] or [])
            )
        ):
            return
        if not (isinstance(user, Channel)):
            if self.config["silent_bots"] and message.sender.bot:
                return

https://github.com/hikariatama/ftg/blob/master/silent_tags.py#L270-L289