DiscordBotLinuxMonitor 1.7.8__tar.gz → 1.7.10__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.10
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.10
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.10 (2026/09/19)"
37
37
  __status__ = "Usable for any Linux project"
38
38
 
39
39
  # pyright: reportMissingTypeStubs=false
@@ -1157,12 +1157,12 @@ class DiscordBotLinuxMonitor:
1157
1157
  out_msg: str = await self.monitoring.restart_service(is_private=is_private, service_name=service_name, force_restart=True)
1158
1158
 
1159
1159
  # Répondre à l'utilisateur
1160
- await self._interaction_followup_send_embed(interaction=interaction, title="Restart Service", icon="🔄", msg=out_msg)
1160
+ await self._interaction_followup_send_embed(interaction=interaction, title="Restart Service" + f" — {service_name}", icon="🔄", msg=out_msg)
1161
1161
 
1162
1162
  except Exception as e:
1163
1163
  out_msg = f"**Internal error restarting service {service_name}**:\n```sh\n{e}\n```"
1164
1164
  logging.exception(msg=out_msg)
1165
- await self._interaction_followup_send_embed(interaction=interaction, title="Restart Service", icon="🔄", msg=out_msg, is_error=True)
1165
+ await self._interaction_followup_send_embed(interaction=interaction, title="Restart Service" + f" — {service_name}", icon="🔄", msg=out_msg, is_error=True)
1166
1166
 
1167
1167
  async def stop_service(self, interaction: discord.Interaction, service_name: str) -> None:
1168
1168
  if not self._check_if_valid_guild(guild=interaction.guild):
@@ -1182,11 +1182,11 @@ class DiscordBotLinuxMonitor:
1182
1182
  out_msg: str = await self.monitoring.stop_service(is_private=is_private, service_name=service_name)
1183
1183
 
1184
1184
  # Répondre à l'utilisateur
1185
- await self._interaction_followup_send_embed(interaction=interaction, title="Stop Service", icon="🛑", msg=out_msg)
1185
+ await self._interaction_followup_send_embed(interaction=interaction, title="Stop Service" + f" — {service_name}", icon="🛑", msg=out_msg)
1186
1186
  except Exception as e:
1187
1187
  out_msg = f"**Internal error stopping service {service_name}**:\n```sh\n{e}\n```"
1188
1188
  logging.exception(msg=out_msg)
1189
- await self._interaction_followup_send_embed(interaction=interaction, title="Stop Service", icon="🛑", msg=out_msg, is_error=True)
1189
+ await self._interaction_followup_send_embed(interaction=interaction, title="Stop Service" + f" — {service_name}", icon="🛑", msg=out_msg, is_error=True)
1190
1190
 
1191
1191
  async def list_services(self, interaction: discord.Interaction) -> None:
1192
1192
  if not self._check_if_valid_guild(guild=interaction.guild):
@@ -1273,11 +1273,11 @@ class DiscordBotLinuxMonitor:
1273
1273
  out_msg: str = await self.monitoring.kill_process(pid=pid)
1274
1274
 
1275
1275
  # Répondre à l'utilisateur
1276
- await self._interaction_followup_send_embed(interaction=interaction, title="Kill Process", icon="☠️", msg=out_msg)
1276
+ await self._interaction_followup_send_embed(interaction=interaction, title="Kill Process" + f" — PID {pid}", icon="☠️", msg=out_msg)
1277
1277
  except Exception as e:
1278
1278
  out_msg = f"**Internal error stopping process of PID {pid}**:\n```sh\n{e}\n```"
1279
1279
  logging.exception(msg=out_msg)
1280
- await self._interaction_followup_send_embed(interaction=interaction, title="Kill Process", icon="☠️", msg=out_msg, is_error=True)
1280
+ await self._interaction_followup_send_embed(interaction=interaction, title="Kill Process" + f" — PID {pid}", icon="☠️", msg=out_msg, is_error=True)
1281
1281
 
1282
1282
  async def clear_channel_messages(self, interaction: discord.Interaction, channel: discord.TextChannel) -> None:
1283
1283
  if not self._check_if_valid_guild(guild=interaction.guild):
@@ -1716,7 +1716,12 @@ class DiscordBotLinuxMonitor:
1716
1716
  out_msg += f"**/{cmd}** — {info['desc']}\n"
1717
1717
  out_msg += f" └─ {private_indicator} | ⏳ Cooldown: {info['cooldown']}\n\n"
1718
1718
 
1719
- await self._interaction_followup_send_embed(interaction=interaction, title="Discord Bot Commands Help", icon="🔍", msg=out_msg)
1719
+ if command_name:
1720
+ title = f"Help for command '{command_name}'"
1721
+ else:
1722
+ title = "Discord Bot Commands Help"
1723
+
1724
+ await self._interaction_followup_send_embed(interaction=interaction, title=title, icon="🔍", msg=out_msg)
1720
1725
  except Exception as e:
1721
1726
  out_msg = f"**Internal error retrieving help**:\n```sh\n{e}\n```"
1722
1727
  logging.exception(msg=out_msg)
@@ -1766,17 +1771,24 @@ class DiscordBotLinuxMonitor:
1766
1771
  # Indiquer que la commande est en cours de traitement
1767
1772
  await interaction.response.defer()
1768
1773
 
1774
+ if parameters:
1775
+ title = f"Execute Command — {command_name} {parameters}"
1776
+ else:
1777
+ title = f"Execute Command — {command_name}"
1778
+
1769
1779
  try:
1770
1780
  is_private: bool = self._is_private_channel(channel=interaction.channel) # type: ignore
1771
1781
  # Exécuter la commande demandée
1772
1782
  out_msg: str = await self.monitoring.execute_command(is_private=is_private, command_name=command_name, parameters=parameters)
1773
1783
 
1774
1784
  # Répondre à l'utilisateur
1775
- await self._interaction_followup_send_embed(interaction=interaction, title=f"Execute Command — {command_name}", icon="▶️", msg=out_msg)
1785
+ # On y inclu les params que si fournis, pour que l'utilisateur voie ce qu'il a demandé.
1786
+
1787
+ await self._interaction_followup_send_embed(interaction=interaction, title=title, icon="▶️", msg=out_msg)
1776
1788
  except Exception as e:
1777
1789
  out_msg = f"**Internal error executing command '{command_name}'**:\n```sh\n{e}\n```"
1778
1790
  logging.exception(msg=out_msg)
1779
- await self._interaction_followup_send_embed(interaction=interaction, title=f"Execute Command — {command_name}", icon="▶️", msg=out_msg, is_error=True)
1791
+ await self._interaction_followup_send_embed(interaction=interaction, title=title, icon="▶️", msg=out_msg, is_error=True)
1780
1792
 
1781
1793
  async def execute_all_commands(self, interaction: discord.Interaction) -> None:
1782
1794
  if not self._check_if_valid_guild(guild=interaction.guild):
@@ -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.10",
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",