This commit is contained in:
Rykov7
2022-11-28 10:23:37 +03:00
parent 8f0a1f1ca7
commit 869c77b97c
4 changed files with 16 additions and 14 deletions
+8 -9
View File
@@ -9,13 +9,13 @@ from flask import Flask, request, abort
from telebot import types
from . import reminder
from . import trolling
from . import admin
from . import report
from .admin import reload_modules
from .config import bot, URL_RX, ALLOWED_WORDS, ADMIN_ID, TOKEN, PYTHONCHATRU
from .me import get_me
from .query_log import logging
# https://core.telegram.org/bots/api Telegram Bot API
# https://github.com/eternnoir/pyTelegramBotAPI/tree/master/examples
@@ -227,13 +227,6 @@ def send_stats(message):
parse_mode='HTML', disable_web_page_preview=True)
@bot.message_handler(commands=['reload'])
def send_stats(message):
reload_modules()
bot.send_message(message.chat.id, 'Reloaded successful',
parse_mode='HTML')
@bot.message_handler(commands=['reset_stats'])
def send_stats(message):
report.reset_report_stats()
@@ -241,6 +234,12 @@ def send_stats(message):
parse_mode='HTML', disable_web_page_preview=True)
@bot.message_handler(commands=['reload'])
def send_stats(message):
admin.reload_modules()
bot.send_message(message.chat.id, 'Reloaded successfully')
def check_chat(message: types.Message):
if message.chat.id == PYTHONCHATRU:
return True