Skip to content

Commit

Permalink
feat: hide db commands from /help (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pochemuta authored Mar 29, 2024
1 parent 9fc4212 commit b46b416
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,36 +408,26 @@ def init_handlers(self):
self.admin_reply_handler("sample_job"),
)

# admin-only DB cmds
self.add_admin_handler(
# db commands hidden from /help command
self.add_handler(
"db_fetch_authors_sheet",
CommandCategories.DATA_SYNC,
self.admin_reply_handler("db_fetch_authors_sheet_job"),
"обновить таблицу с авторами из Google Sheets",
)
self.add_admin_handler(
self.add_handler(
"db_fetch_curators_sheet",
CommandCategories.DATA_SYNC,
self.admin_reply_handler("db_fetch_curators_sheet_job"),
"обновить таблицу с кураторами из Google Sheets",
)
self.add_admin_handler(
self.add_handler(
"db_fetch_team_sheet",
CommandCategories.DATA_SYNC,
self.admin_reply_handler("db_fetch_team_sheet_job"),
"обновить таблицу с командой из Google Sheets",
)
self.add_admin_handler(
self.add_handler(
"db_fetch_strings_sheet",
CommandCategories.DATA_SYNC,
self.admin_reply_handler("db_fetch_strings_sheet_job"),
"обновить таблицу со строками из Google Sheets",
)
self.add_admin_handler(
self.add_handler(
"db_fetch_all_team_members",
CommandCategories.DATA_SYNC,
self.admin_reply_handler("db_fetch_all_team_members_job"),
"обновить таблицы всех пользователей (авторов, кураторов, команда) из Google Sheets",
)

# general purpose cmds
Expand Down

0 comments on commit b46b416

Please sign in to comment.