Minor bug fixes

This commit is contained in:
Davte 2020-02-14 17:42:15 +01:00
parent ecdb639741
commit 0a05c1e1c1
2 changed files with 4 additions and 4 deletions

View File

@ -14,12 +14,12 @@ __author__ = "Davide Testa"
__email__ = "davide@davte.it" __email__ = "davide@davte.it"
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
__license__ = "GNU General Public License v3.0" __license__ = "GNU General Public License v3.0"
__version__ = "2.3.27" __version__ = "2.3.28"
__maintainer__ = "Davide Testa" __maintainer__ = "Davide Testa"
__contact__ = "t.me/davte" __contact__ = "t.me/davte"
# Legacy module; please use `from davtelepot.bot import Bot` from now on # Legacy module; please use `from davtelepot.bot import Bot` from now on
from .custombot import Bot from .custombot import Bot
from . import administration_tools, bot, helper, utilities from . import administration_tools, authorization, bot, helper, utilities
__all__ = [administration_tools, Bot, bot, helper, utilities] __all__ = [administration_tools, authorization, Bot, bot, helper, utilities]

View File

@ -36,7 +36,7 @@ def get_command_description(bot, update, user_record):
bot.commands.items(), bot.commands.items(),
key=lambda x:x[0] key=lambda x:x[0]
) )
if details['description'] if 'description' in details and details['description']
and user_role.code <= bot.Role.get_user_role( and user_role.code <= bot.Role.get_user_role(
user_role_id=details['authorization_level'] user_role_id=details['authorization_level']
).code ).code