Fix
This commit is contained in:
parent
d4349f1029
commit
9ad88622e4
1
.gitignore
vendored
1
.gitignore
vendored
@ -17,5 +17,6 @@ __pycache__/
|
||||
*.txt
|
||||
!requirements.txt
|
||||
test.py
|
||||
engineering_works.py
|
||||
venv/
|
||||
.vscode/
|
47
1.patch
47
1.patch
@ -1,47 +0,0 @@
|
||||
diff --git a/filters/main.py b/filters/main.py
|
||||
index 849e6de..7539de0 100644
|
||||
--- a/filters/main.py
|
||||
+++ b/filters/main.py
|
||||
@@ -28,7 +28,7 @@ class BotAdmin(BoundFilter):
|
||||
self.admin = admin
|
||||
|
||||
async def check(self, message: types.Message):
|
||||
- if message.from_user.id in config.admin_user:
|
||||
+ if message.from_user.id in [int(i) for i in config.admin_users.split(",")]:
|
||||
return True
|
||||
else:
|
||||
await message.answer("Хорошая попытка, но ты не администратор!")
|
||||
diff --git a/handlers/private/main.py b/handlers/private/main.py
|
||||
index de03596..370218a 100644
|
||||
--- a/handlers/private/main.py
|
||||
+++ b/handlers/private/main.py
|
||||
@@ -45,7 +45,7 @@ async def get_replace(message: types.Message, state: FSMContext):
|
||||
|
||||
link = (
|
||||
'<a href="{}">Проверьте замены тут</a>'
|
||||
- .format(config.bot("link"))
|
||||
+ .format(config.link)
|
||||
)
|
||||
logging.info("User: {user_id} - {username}".format(
|
||||
user_id=str(message.from_user.id),
|
||||
@@ -94,7 +94,7 @@ async def get_replace(message: types.Message, state: FSMContext):
|
||||
async def get_link(message: types.Message):
|
||||
msg = (
|
||||
'<a href="{}">Проверьте замены тут</a>'
|
||||
- .format(config.bot("link"))
|
||||
+ .format(config.link)
|
||||
)
|
||||
await bot.send_message(
|
||||
message.chat.id,
|
||||
diff --git a/utils/bot_commands.py b/utils/bot_commands.py
|
||||
index b65bc62..3de6ed1 100644
|
||||
--- a/utils/bot_commands.py
|
||||
+++ b/utils/bot_commands.py
|
||||
@@ -7,6 +7,6 @@ async def set_commands(dp):
|
||||
types.BotCommand("help", "информация"),
|
||||
types.BotCommand("link", "получить ссылку на файл"),
|
||||
types.BotCommand('timetable', "Розклад"),
|
||||
- types.BotCommand('feedback', "Звязок з адміністратором")
|
||||
+ types.BotCommand('feedback', "Звязок з адміністратором"),
|
||||
types.BotCommand("reload", "только для администрации"),
|
||||
])
|
@ -1,3 +1,4 @@
|
||||
|
||||
import datetime
|
||||
import asyncio
|
||||
import aioschedule as schedule
|
||||
@ -15,8 +16,8 @@ async def announce():
|
||||
except Exception:
|
||||
message = "Ошибка обновления данных!"
|
||||
if config.admin_users.split(',') is not None:
|
||||
for user_id in config.admin_users.split(','):
|
||||
if user_id in config.exclude:
|
||||
for user_id in [int(i) for i in config.admin_users.split(',')]:
|
||||
if user_id in [int(i) for i in config.exclude.split(",")]:
|
||||
continue
|
||||
await dp.bot.send_message(user_id, message)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user