diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index c006f21..0b9fc06 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.4.2" +__version__ = "2.4.3" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/suggestions.py b/davtelepot/suggestions.py index df8cffe..61339ec 100644 --- a/davtelepot/suggestions.py +++ b/davtelepot/suggestions.py @@ -257,6 +257,30 @@ def init(telegram_bot: davtelepot.bot.Bot, suggestion_messages=default_suggestio + suggestion_messages['suggestions_command']['aliases'] ) + db = telegram_bot.db + types = db.types + if 'suggestions' not in db.tables: + table = db.create_table( + table_name='suggestions' + ) + table.create_column( + 'user_id', + types.integer + ) + table.create_column( + 'suggestion', + types.text + ) + table.create_column( + 'created', + types.datetime + ) + table.create_column( + 'sent', + types.datetime + ) + + @telegram_bot.command(command=suggestion_messages['suggestions_command']['command'], aliases=suggestion_messages['suggestions_command']['aliases'], reply_keyboard_button=(