Minor bug fixes

pull/1/head
hikari.ftg 2022-03-26 21:18:28 +00:00
parent 298fb19380
commit efbc64425b
4 changed files with 9 additions and 3 deletions

View File

@ -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):

View File

@ -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]:
"""

View File

@ -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:

View File

@ -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)