diff --git a/ciclopibot/__init__.py b/ciclopibot/__init__.py index a100cc5..9b3e57b 100644 --- a/ciclopibot/__init__.py +++ b/ciclopibot/__init__.py @@ -3,7 +3,7 @@ __author__ = "Davide Testa" __email__ = "davide@davte.it" __license__ = "GNU General Public License v3.0" -__version__ = "1.1.12" +__version__ = "1.1.13" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/ciclopibot/bot.py b/ciclopibot/bot.py index 5f024f9..d6ad3bf 100644 --- a/ciclopibot/bot.py +++ b/ciclopibot/bot.py @@ -9,7 +9,7 @@ import sys import davtelepot # Project modules -from . import ciclopi +from . import ciclopi, messages from .data.passwords import bot_token from .messages import ( default_help_messages, language_messages, supported_languages @@ -73,11 +73,10 @@ if __name__ == '__main__': bot.set_class_log_file_name(log_file_name) bot.set_class_errors_file_name(errors_file_name) bot.set_unknown_command_message( - "Comando sconosciuto!\n" - "Scrivi /help per visualizzare la guida." + messages.unknown_command_message ) bot.set_authorization_denied_message( - "Non disponi di autorizzazioni sufficienti per questo comando." + messages.authorization_denied_message ) with bot.db as db: db['users'].upsert( diff --git a/ciclopibot/messages.py b/ciclopibot/messages.py index 945005e..ef0a2d9 100644 --- a/ciclopibot/messages.py +++ b/ciclopibot/messages.py @@ -1,5 +1,10 @@ """Default messages for bot functions.""" +authorization_denied_message = { + 'en': "You are not allowed to use this command, sorry.", + 'it': "Non disponi di autorizzazioni sufficienti per questa richiesta, spiacente.", +} + language_messages = { 'language_command': { 'name': { @@ -496,3 +501,8 @@ default_help_messages = { 'it': "Comandi 🤖", }, } + +unknown_command_message = { + 'en': "Unknown command! Touch /help to read the guide and available commands.", + 'it': "Comando sconosciuto! Fai /help per leggere la guida e i comandi." +}