mirror of
https://github.com/Steffo99/greed.git
synced 2024-11-24 14:54:18 +00:00
Hide admin menu when category_mode = false in config.toml.
This commit is contained in:
parent
4bd2413dce
commit
266ca37e8e
1 changed files with 2 additions and 3 deletions
|
@ -197,7 +197,6 @@ class Worker(threading.Thread):
|
||||||
self.__create_localization()
|
self.__create_localization()
|
||||||
# Capture exceptions that occour during the conversation
|
# Capture exceptions that occour during the conversation
|
||||||
# noinspection PyBroadException
|
# noinspection PyBroadException
|
||||||
log.debug("TEST")
|
|
||||||
log.debug(self.admin)
|
log.debug(self.admin)
|
||||||
try:
|
try:
|
||||||
# Welcome the user to the bot
|
# Welcome the user to the bot
|
||||||
|
@ -1020,12 +1019,12 @@ class Worker(threading.Thread):
|
||||||
while True:
|
while True:
|
||||||
# Create a keyboard with the admin main menu based on the admin permissions specified in the db
|
# Create a keyboard with the admin main menu based on the admin permissions specified in the db
|
||||||
keyboard = []
|
keyboard = []
|
||||||
if self.admin.edit_products and self.admin.edit_categories:
|
if self.admin.edit_products and self.admin.edit_categories and CategoryMode:
|
||||||
keyboard.append([self.loc.get("menu_products"), self.loc.get("menu_categories")])
|
keyboard.append([self.loc.get("menu_products"), self.loc.get("menu_categories")])
|
||||||
else:
|
else:
|
||||||
if self.admin.edit_products:
|
if self.admin.edit_products:
|
||||||
keyboard.append([self.loc.get("menu_products")])
|
keyboard.append([self.loc.get("menu_products")])
|
||||||
if self.admin.edit_categories:
|
if self.admin.edit_categories and CategoryMode:
|
||||||
keyboard.append([self.loc.get("menu_categories")])
|
keyboard.append([self.loc.get("menu_categories")])
|
||||||
if self.admin.receive_orders:
|
if self.admin.receive_orders:
|
||||||
keyboard.append([self.loc.get("menu_orders")])
|
keyboard.append([self.loc.get("menu_orders")])
|
||||||
|
|
Loading…
Reference in a new issue