From efbc64425b106002ccd62a444495ce1d41673ae9 Mon Sep 17 00:00:00 2001 From: "hikari.ftg" Date: Sat, 26 Mar 2022 21:18:28 +0000 Subject: [PATCH] Minor bug fixes --- hikka/dispatcher.py | 5 +++++ hikka/inline.py | 4 ++-- hikka/main.py | 2 +- hikka/modules/corectrl.py | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hikka/dispatcher.py b/hikka/dispatcher.py index f524e44..6b345ec 100755 --- a/hikka/dispatcher.py +++ b/hikka/dispatcher.py @@ -200,6 +200,11 @@ class CommandDispatcher: prefix = prefix[0] self._db.set(main.__name__, "command_prefix", prefix) + if len(prefix) != 1: + prefix = "." + self._db.set(main.__name__, "command_prefix", prefix) + logging.warning("Prefix has been reset to a default one («.»)") + change = str.maketrans(ru_keys + en_keys, en_keys + ru_keys) if event.message.message.startswith(prefix): diff --git a/hikka/inline.py b/hikka/inline.py index dd8aa17..a1e3d69 100755 --- a/hikka/inline.py +++ b/hikka/inline.py @@ -1258,8 +1258,8 @@ class InlineManager: caption: Union[str, FunctionType], message: Union[Message, int], next_handler: FunctionType, - force_me: bool = False, - always_allow: bool = False, + force_me: bool = True, + always_allow: bool = None, ttl: int = False, ) -> Union[bool, str]: """ diff --git a/hikka/main.py b/hikka/main.py index 1d0e26c..4985e35 100755 --- a/hikka/main.py +++ b/hikka/main.py @@ -56,7 +56,7 @@ from .translations.core import Translator from math import ceil -__version__ = (1, 0, 1) +__version__ = (1, 0, 2) try: from .web import core except ImportError: diff --git a/hikka/modules/corectrl.py b/hikka/modules/corectrl.py index 0392f9b..c75c7c0 100755 --- a/hikka/modules/corectrl.py +++ b/hikka/modules/corectrl.py @@ -170,6 +170,7 @@ class CoreMod(loader.Module): if len(args) != 1: await utils.answer(message, self.strings("prefix_incorrect", message)) + return oldprefix = self._db.get(main.__name__, "command_prefix", ".") self._db.set(main.__name__, "command_prefix", args)