|
14 | 14 | from telegram.utils.helpers import escape_markdown |
15 | 15 |
|
16 | 16 | from tg_bot import dispatcher, updater, TOKEN, WEBHOOK, OWNER_ID, DONATION_LINK, CERT_PATH, PORT, URL, LOGGER, \ |
17 | | - ALLOW_EXCL, DEFAULT_CHAT_ID |
| 17 | + ALLOW_EXCL, DEFAULT_CHAT_ID, VERSION |
18 | 18 | # needed to dynamically load modules |
19 | 19 | # NOTE: Module order is not guaranteed, specify that in the config file! |
20 | 20 | from tg_bot.modules import ALL_MODULES |
21 | 21 | from tg_bot.modules.helper_funcs.chat_status import is_user_admin |
22 | 22 | from tg_bot.modules.helper_funcs.misc import paginate_modules |
23 | 23 |
|
24 | | -version = "0.00.1" |
25 | | - |
26 | 24 | PM_START_TEXT = """ |
27 | 25 | Ciao {}, io sono {}! Il bot numero 1 di python_ita. Se hai qualche dubbio su come usarmi, leggi l'output del comando /help . |
28 | 26 |
|
@@ -296,7 +294,7 @@ def CoCDone(bot: Bot, update: Update): |
296 | 294 | # reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="Torna sul gruppo", callback_data="buttonurl://t.me/TheElectusBot?start=-1001082749604")]])) |
297 | 295 | update.effective_message.reply_text(COC_STRING, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True) |
298 | 296 | # Deactivating mute |
299 | | - bot.restrict_chat_member(chat.id, int(user_id), |
| 297 | + bot.restrict_chat_member(chat.id, int(user.id), |
300 | 298 | can_send_messages=True, |
301 | 299 | can_send_media_messages=True, |
302 | 300 | can_send_other_messages=True, |
@@ -465,7 +463,7 @@ def main(): |
465 | 463 |
|
466 | 464 | # Restarting bot message |
467 | 465 | dispatcher.bot.sendMessage(chat_id=int(DEFAULT_CHAT_ID), |
468 | | - text="Sistema *riavviato*.\nVersione: {}".format(str(version)), |
| 466 | + text="Sistema *riavviato*.\nVersione: {}".format(str(VERSION)), |
469 | 467 | parse_mode=ParseMode.MARKDOWN) |
470 | 468 |
|
471 | 469 | # add antiflood processor |
|
0 commit comments