diff --git a/app/bot.py b/app/bot.py index 210f823..c7de980 100644 --- a/app/bot.py +++ b/app/bot.py @@ -9,6 +9,7 @@ from . import stan from . import reminder from . import reloader from . import report +from . import get from .helpers import get_me, search_it from .filters import * from .config import * @@ -224,6 +225,11 @@ def default_query(inline_query): """ +@bot.message_handler(func=is_admin, commands=['ip']) +def get_ip(message): + bot.send_message(message.chat.id, get.my_ip()) + + @bot.message_handler(func=is_admin, commands=['reload']) def send_stats(message): logging.warning('Reloading...') diff --git a/app/config.py b/app/config.py index db9c92d..e6af5db 100644 --- a/app/config.py +++ b/app/config.py @@ -20,7 +20,7 @@ ADMIN_ID = 280887861 # Rykov7 PYTHONCHATRU = -1001338616632 # pythonchatru URL_RX = re.compile(r'\w+\.\w+/\w+') -ALLOWED_WORDS = ['paste', 'github', 'google', 'nometa', 'python', 'django', 'flask', 'fastapi', 'wiki', +ALLOWED_WORDS = ['paste', 'nekobin', 'github', 'google', 'nometa', 'python', 'django', 'flask', 'fastapi', 'wiki', 'stackoverflow', 'habr', 'medium', 'youtu', 'stepik', 'telegraph', '#rtfm', 'support'] WHITEUN = set(os.environ.get('whitelist', '<<