diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index 195962f..fb0728f 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -14,7 +14,7 @@ __author__ = "Davide Testa" __email__ = "davide@davte.it" __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __license__ = "GNU General Public License v3.0" -__version__ = "2.1.33" +__version__ = "2.1.34" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/administration_tools.py b/davtelepot/administration_tools.py index 0f2efcf..c70db1c 100644 --- a/davtelepot/administration_tools.py +++ b/davtelepot/administration_tools.py @@ -603,6 +603,14 @@ default_admin_messages = { 'it': "Risultato della query" } }, + 'select_command': { + 'description': { + 'en': "Receive the result of a SELECT query performed on bot " + "database", + 'it': "Ricevi il risultato di una query SQL di tipo SELECT " + "sul database del bot" + } + }, 'query_button': { 'error': { 'en': "Error!", @@ -973,6 +981,12 @@ def init(bot, talk_messages=None, admin_messages=None): async def query_command(bot, update, user_record): return await _query_command(bot, update, user_record) + @bot.command(command='/select', aliases=[], show_in_keyboard=False, + description=admin_messages['select_command']['description'], + authorization_level='admin') + async def select_command(bot, update, user_record): + return await _query_command(bot, update, user_record) + @bot.button(prefix='db_query:///', separator='|', description=admin_messages['query_command']['description'], authorization_level='admin')