Improved logging

This commit is contained in:
Profitroll 2023-05-28 11:43:45 +02:00
parent 37e2e86f0c
commit 434503e9a9

View File

@ -216,16 +216,17 @@ class PyroClient(Client):
return
for command_set in command_sets:
logger.info(
"Registering command set with commands %s and scope '%s' (%s)",
command_set.commands,
command_set.scope,
command_set.language_code,
)
await self.set_bot_commands(
command_set.commands,
command_set.scope,
language_code=command_set.language_code,
)
logger.info(
"Registering command set with commands %s and scope '%s'",
command_set.commands,
command_set.scope,
)
async def remove_commands(self, command_sets: Union[List[CommandSet], None] = None):
"""Remove commands stored in bot's 'commands' attribute"""
@ -239,8 +240,9 @@ class PyroClient(Client):
for command_set in command_sets:
logger.info(
"Removing command set with scope '%s'",
"Removing command set with scope '%s' (%s)",
command_set.scope,
command_set.language_code,
)
await self.delete_bot_commands(
command_set.scope,