Added logic to handle public and private messages #147

This commit is contained in:
2022-12-27 19:00:50 +01:00
parent 59d38f8f2a
commit 3b7345b404
4 changed files with 10 additions and 10 deletions

View File

@@ -42,7 +42,7 @@ class HelpCommand(DiscordCommandABC):
self._logger.debug(__name__, f'Received command help {ctx}:{persistent_flag}')
settings: BaseServerSettings = self._config.get_configuration(f'BaseServerSettings_{ctx.guild.id}')
is_persistent = persistent_flag == '--stay'
await self._message_service.send_ctx_msg(ctx, settings.help_command_reference_url, is_persistent=is_persistent)
await self._message_service.send_ctx_msg(ctx, settings.help_command_reference_url, is_persistent=is_persistent, is_public=True)
self._logger.trace(__name__, f'Finished help command')
@help.autocomplete('persistent_flag')

View File

@@ -110,7 +110,7 @@ class LogCommand(DiscordCommandABC):
zip_file = ZipFile('logs.zip', 'w')
files.for_each(lambda x: zip_file.write(x))
zip_file.close()
await self._message_service.send_interaction_msg(ctx.interaction, self._t.transform('modules.technician.log_message'), file=discord.File(zip_file.filename, 'logs.zip'), ephemeral=True)
await self._message_service.send_interaction_msg(ctx.interaction, self._t.transform('modules.technician.log_message'), file=discord.File(zip_file.filename, 'logs.zip'))
os.remove(zip_file.filename)
self._logger.trace(__name__, f'Finished log command')