mirror of https://github.com/coddrago/Heroku
Minor bug fixes
parent
298fb19380
commit
efbc64425b
|
@ -200,6 +200,11 @@ class CommandDispatcher:
|
||||||
prefix = prefix[0]
|
prefix = prefix[0]
|
||||||
self._db.set(main.__name__, "command_prefix", prefix)
|
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)
|
change = str.maketrans(ru_keys + en_keys, en_keys + ru_keys)
|
||||||
|
|
||||||
if event.message.message.startswith(prefix):
|
if event.message.message.startswith(prefix):
|
||||||
|
|
|
@ -1258,8 +1258,8 @@ class InlineManager:
|
||||||
caption: Union[str, FunctionType],
|
caption: Union[str, FunctionType],
|
||||||
message: Union[Message, int],
|
message: Union[Message, int],
|
||||||
next_handler: FunctionType,
|
next_handler: FunctionType,
|
||||||
force_me: bool = False,
|
force_me: bool = True,
|
||||||
always_allow: bool = False,
|
always_allow: bool = None,
|
||||||
ttl: int = False,
|
ttl: int = False,
|
||||||
) -> Union[bool, str]:
|
) -> Union[bool, str]:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -56,7 +56,7 @@ from .translations.core import Translator
|
||||||
|
|
||||||
from math import ceil
|
from math import ceil
|
||||||
|
|
||||||
__version__ = (1, 0, 1)
|
__version__ = (1, 0, 2)
|
||||||
try:
|
try:
|
||||||
from .web import core
|
from .web import core
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
|
@ -170,6 +170,7 @@ class CoreMod(loader.Module):
|
||||||
|
|
||||||
if len(args) != 1:
|
if len(args) != 1:
|
||||||
await utils.answer(message, self.strings("prefix_incorrect", message))
|
await utils.answer(message, self.strings("prefix_incorrect", message))
|
||||||
|
return
|
||||||
|
|
||||||
oldprefix = self._db.get(main.__name__, "command_prefix", ".")
|
oldprefix = self._db.get(main.__name__, "command_prefix", ".")
|
||||||
self._db.set(main.__name__, "command_prefix", args)
|
self._db.set(main.__name__, "command_prefix", args)
|
||||||
|
|
Loading…
Reference in New Issue