DiscordBotLinuxMonitor 1.7.1__tar.gz → 1.7.2__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.1
3
+ Version: 1.7.2
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.1
3
+ Version: 1.7.2
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
@@ -168,7 +168,7 @@ def main() -> None:
168
168
  async def help_command(interaction: discord.Interaction, command_name: str = "") -> None: # type: ignore
169
169
  await discord_bot_linux_monitor.show_help(interaction, command_name)
170
170
 
171
- @discord_bot.tree.command(name="list_periodic_channels_cleanup", description="🧹 Show auto-cleanup channel configuration and permission status 🧹")
171
+ @discord_bot.tree.command(name="list_periodic_channels_cleanup", description="[Private] 🧹 Show auto-cleanup channel configuration and permission status 🧹")
172
172
  @app_commands.checks.cooldown(3, 20.0)
173
173
  async def list_periodic_channels_cleanup(interaction: discord.Interaction) -> None: # type: ignore
174
174
  await discord_bot_linux_monitor.show_list_periodic_channels_cleanup(interaction)
@@ -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.1 (2026/08/29)"
36
+ __version__ = "1.7.2 (2026/08/29)"
37
37
  __status__ = "Usable for any Linux project"
38
38
 
39
39
  # pyright: reportMissingTypeStubs=false
@@ -1579,13 +1579,19 @@ class DiscordBotLinuxMonitor:
1579
1579
 
1580
1580
  # Summary
1581
1581
  summary_icon = "✅"
1582
- all_ok = all(
1583
- discord.utils.get(guild.text_channels, name=ch.get('channel_name', '')) and
1584
- (guild.me and
1585
- guild.me.permissions_for(discord.utils.get(guild.text_channels, name=ch.get('channel_name', ''))).manage_messages and
1586
- guild.me.permissions_for(discord.utils.get(guild.text_channels, name=ch.get('channel_name', ''))).read_message_history)
1587
- for ch in channels_config
1588
- )
1582
+ all_ok = True
1583
+ for ch in channels_config:
1584
+ channel_name = ch.get('channel_name', '')
1585
+ channel = discord.utils.get(guild.text_channels, name=channel_name) if guild else None
1586
+ if not channel or not bot_member:
1587
+ all_ok = False
1588
+ break
1589
+
1590
+ permissions = channel.permissions_for(bot_member)
1591
+ if not permissions.manage_messages or not permissions.read_message_history:
1592
+ all_ok = False
1593
+ break
1594
+
1589
1595
  if not all_ok:
1590
1596
  summary_icon = "⚠️"
1591
1597
 
@@ -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.1",
9
+ version="1.7.2",
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",