Multilanguage command descriptions
This commit is contained in:
parent
a2b8c8b03a
commit
20c0717b81
@ -3,6 +3,6 @@
|
|||||||
__author__ = "Davide Testa"
|
__author__ = "Davide Testa"
|
||||||
__email__ = "davide@davte.it"
|
__email__ = "davide@davte.it"
|
||||||
__license__ = "GNU General Public License v3.0"
|
__license__ = "GNU General Public License v3.0"
|
||||||
__version__ = "1.0.10"
|
__version__ = "1.0.11"
|
||||||
__maintainer__ = "Davide Testa"
|
__maintainer__ = "Davide Testa"
|
||||||
__contact__ = "t.me/davte"
|
__contact__ = "t.me/davte"
|
||||||
|
@ -24,7 +24,15 @@ def get_command_description(bot, update, user_record):
|
|||||||
[
|
[
|
||||||
"/{}: {}".format(
|
"/{}: {}".format(
|
||||||
command,
|
command,
|
||||||
|
bot.get_message(
|
||||||
|
'commands', command, 'description',
|
||||||
|
user_record=user_record, update=update,
|
||||||
|
default_message=(
|
||||||
details['description']
|
details['description']
|
||||||
|
if type(details['description']) is str
|
||||||
|
else ''
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
for command, details in sorted(
|
for command, details in sorted(
|
||||||
bot.commands.items(),
|
bot.commands.items(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user