DiscordBotLinuxMonitor 1.7.8__tar.gz → 1.7.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DiscordBotLinuxMonitor
3
- Version: 1.7.8
3
+ Version: 1.7.9
4
4
  Summary: From discord channels: Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)
5
5
  Home-page: https://github.com/QuentinCG/Discord-Bot-Linux-Monitor-Python-Library
6
6
  Author: Quentin Comte-Gaz
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DiscordBotLinuxMonitor
3
- Version: 1.7.8
3
+ Version: 1.7.9
4
4
  Summary: From discord channels: Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)
5
5
  Home-page: https://github.com/QuentinCG/Discord-Bot-Linux-Monitor-Python-Library
6
6
  Author: Quentin Comte-Gaz
@@ -33,7 +33,7 @@ __email__ = "quentin@comte-gaz.com"
33
33
  __license__ = "MIT License"
34
34
  __copyright__ = "Copyright Quentin Comte-Gaz (2026)"
35
35
  __python_version__ = "3.+"
36
- __version__ = "1.7.8 (2026/09/19)"
36
+ __version__ = "1.7.9 (2026/09/19)"
37
37
  __status__ = "Usable for any Linux project"
38
38
 
39
39
  # pyright: reportMissingTypeStubs=false
@@ -1155,12 +1155,13 @@ class DiscordBotLinuxMonitor:
1155
1155
  # Redémarrer le service et récupérer le message de sortie
1156
1156
  is_private: bool = self._is_private_channel(channel=interaction.channel) # type: ignore
1157
1157
  out_msg: str = await self.monitoring.restart_service(is_private=is_private, service_name=service_name, force_restart=True)
1158
+ out_msg = f"Parameters received: service_name={service_name!r}\n{out_msg}"
1158
1159
 
1159
1160
  # Répondre à l'utilisateur
1160
1161
  await self._interaction_followup_send_embed(interaction=interaction, title="Restart Service", icon="🔄", msg=out_msg)
1161
1162
 
1162
1163
  except Exception as e:
1163
- out_msg = f"**Internal error restarting service {service_name}**:\n```sh\n{e}\n```"
1164
+ out_msg = f"**Internal error restarting service**\nParameters received: service_name={service_name!r}\n```sh\n{e}\n```"
1164
1165
  logging.exception(msg=out_msg)
1165
1166
  await self._interaction_followup_send_embed(interaction=interaction, title="Restart Service", icon="🔄", msg=out_msg, is_error=True)
1166
1167
 
@@ -1180,11 +1181,12 @@ class DiscordBotLinuxMonitor:
1180
1181
  # Arrêter le service et récupérer le message de sortie
1181
1182
  is_private: bool = self._is_private_channel(channel=interaction.channel) # type: ignore
1182
1183
  out_msg: str = await self.monitoring.stop_service(is_private=is_private, service_name=service_name)
1184
+ out_msg = f"Parameters received: service_name={service_name!r}\n{out_msg}"
1183
1185
 
1184
1186
  # Répondre à l'utilisateur
1185
1187
  await self._interaction_followup_send_embed(interaction=interaction, title="Stop Service", icon="🛑", msg=out_msg)
1186
1188
  except Exception as e:
1187
- out_msg = f"**Internal error stopping service {service_name}**:\n```sh\n{e}\n```"
1189
+ out_msg = f"**Internal error stopping service**\nParameters received: service_name={service_name!r}\n```sh\n{e}\n```"
1188
1190
  logging.exception(msg=out_msg)
1189
1191
  await self._interaction_followup_send_embed(interaction=interaction, title="Stop Service", icon="🛑", msg=out_msg, is_error=True)
1190
1192
 
@@ -1271,11 +1273,12 @@ class DiscordBotLinuxMonitor:
1271
1273
  try:
1272
1274
  # Arrêter le processus et récupérer le message de sortie
1273
1275
  out_msg: str = await self.monitoring.kill_process(pid=pid)
1276
+ out_msg = f"Parameters received: pid={pid!r}\n{out_msg}"
1274
1277
 
1275
1278
  # Répondre à l'utilisateur
1276
1279
  await self._interaction_followup_send_embed(interaction=interaction, title="Kill Process", icon="☠️", msg=out_msg)
1277
1280
  except Exception as e:
1278
- out_msg = f"**Internal error stopping process of PID {pid}**:\n```sh\n{e}\n```"
1281
+ out_msg = f"**Internal error stopping process**\nParameters received: pid={pid!r}\n```sh\n{e}\n```"
1279
1282
  logging.exception(msg=out_msg)
1280
1283
  await self._interaction_followup_send_embed(interaction=interaction, title="Kill Process", icon="☠️", msg=out_msg, is_error=True)
1281
1284
 
@@ -1418,6 +1421,10 @@ class DiscordBotLinuxMonitor:
1418
1421
  except discord.HTTPException as e:
1419
1422
  if e.status == 429:
1420
1423
  _on_rate_limit_hit()
1424
+ error_text = (
1425
+ f"Discord API error (status {e.status}): {e}\n"
1426
+ f"Parameters received: channel={channel.name!r}"
1427
+ )
1421
1428
  embed = self._build_cleanup_embed(
1422
1429
  channel_name=channel.name,
1423
1430
  state="error",
@@ -1426,11 +1433,12 @@ class DiscordBotLinuxMonitor:
1426
1433
  elapsed_seconds=asyncio.get_running_loop().time() - started_monotonic,
1427
1434
  last_deleted_preview=last_deleted_message_preview,
1428
1435
  scanned_count=scanned_count,
1429
- error_text=f"Discord API error (status {e.status}): {e}",
1436
+ error_text=error_text,
1430
1437
  )
1431
1438
  logging.exception(msg=f"Discord API error while clearing messages in channel '{channel.name}': {e}")
1432
1439
  await interaction.edit_original_response(content=None, embed=embed)
1433
1440
  except Exception as e:
1441
+ error_text = f"{e}\nParameters received: channel={channel.name!r}"
1434
1442
  embed = self._build_cleanup_embed(
1435
1443
  channel_name=channel.name,
1436
1444
  state="error",
@@ -1439,9 +1447,9 @@ class DiscordBotLinuxMonitor:
1439
1447
  elapsed_seconds=asyncio.get_running_loop().time() - started_monotonic,
1440
1448
  last_deleted_preview=last_deleted_message_preview,
1441
1449
  scanned_count=scanned_count,
1442
- error_text=str(e),
1450
+ error_text=error_text,
1443
1451
  )
1444
- logging.exception(msg=f"Internal error while clearing messages in channel '{channel.name}': {e}")
1452
+ logging.exception(msg=f"Internal error while clearing messages in channel '{channel.name}' with parameters channel={channel.name!r}: {e}")
1445
1453
  await interaction.edit_original_response(content=None, embed=embed)
1446
1454
  finally:
1447
1455
  heartbeat_stop_event.set()
@@ -1716,9 +1724,10 @@ class DiscordBotLinuxMonitor:
1716
1724
  out_msg += f"**/{cmd}** — {info['desc']}\n"
1717
1725
  out_msg += f" └─ {private_indicator} | ⏳ Cooldown: {info['cooldown']}\n\n"
1718
1726
 
1727
+ out_msg = f"Parameters received: command_name={command_name!r}\n{out_msg}"
1719
1728
  await self._interaction_followup_send_embed(interaction=interaction, title="Discord Bot Commands Help", icon="🔍", msg=out_msg)
1720
1729
  except Exception as e:
1721
- out_msg = f"**Internal error retrieving help**:\n```sh\n{e}\n```"
1730
+ out_msg = f"**Internal error retrieving help**:\nParameters received: command_name={command_name!r}\n```sh\n{e}\n```"
1722
1731
  logging.exception(msg=out_msg)
1723
1732
  await self._interaction_followup_send_embed(interaction=interaction, title="Help", icon="🔍", msg=out_msg, is_error=True)
1724
1733
 
@@ -1770,11 +1779,12 @@ class DiscordBotLinuxMonitor:
1770
1779
  is_private: bool = self._is_private_channel(channel=interaction.channel) # type: ignore
1771
1780
  # Exécuter la commande demandée
1772
1781
  out_msg: str = await self.monitoring.execute_command(is_private=is_private, command_name=command_name, parameters=parameters)
1782
+ out_msg = f"Parameters received: command_name={command_name!r}, parameters={parameters!r}\n{out_msg}"
1773
1783
 
1774
1784
  # Répondre à l'utilisateur
1775
1785
  await self._interaction_followup_send_embed(interaction=interaction, title=f"Execute Command — {command_name}", icon="▶️", msg=out_msg)
1776
1786
  except Exception as e:
1777
- out_msg = f"**Internal error executing command '{command_name}'**:\n```sh\n{e}\n```"
1787
+ out_msg = f"**Internal error executing command '{command_name}'**:\nParameters received: command_name={command_name!r}, parameters={parameters!r}\n```sh\n{e}\n```"
1778
1788
  logging.exception(msg=out_msg)
1779
1789
  await self._interaction_followup_send_embed(interaction=interaction, title=f"Execute Command — {command_name}", icon="▶️", msg=out_msg, is_error=True)
1780
1790
 
@@ -6,7 +6,7 @@ with io.open(file='README.md', mode='r', encoding='utf-8') as readme_file:
6
6
 
7
7
  setup(
8
8
  name="DiscordBotLinuxMonitor",
9
- version="1.7.8",
9
+ version="1.7.9",
10
10
  description="From discord channels: Get information and warning status of Linux server like service, port, ping, ssl certificate, disk/folder/cpu/ram/swap usage, ip connection, ... (Python and shell library, Linux ONLY)",
11
11
  long_description=readme,
12
12
  long_description_content_type="text/markdown",