DiscordBotLinuxMonitor 1.7.0__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.0
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
@@ -22,7 +22,7 @@ Classifier: Environment :: Console
22
22
  Requires-Python: >=3.3
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE.md
25
- Requires-Dist: linuxmonitor~=1.5.12
25
+ Requires-Dist: linuxmonitor~=1.7.0
26
26
  Requires-Dist: discord.py
27
27
  Requires-Dist: typing
28
28
  Requires-Dist: asyncio
@@ -1,4 +1,4 @@
1
- linuxmonitor~=1.5.12
1
+ linuxmonitor~=1.7.0
2
2
  discord.py
3
3
  typing
4
4
  asyncio
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DiscordBotLinuxMonitor
3
- Version: 1.7.0
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
@@ -22,7 +22,7 @@ Classifier: Environment :: Console
22
22
  Requires-Python: >=3.3
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE.md
25
- Requires-Dist: linuxmonitor~=1.5.12
25
+ Requires-Dist: linuxmonitor~=1.7.0
26
26
  Requires-Dist: discord.py
27
27
  Requires-Dist: typing
28
28
  Requires-Dist: asyncio
@@ -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.0 (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
@@ -820,9 +820,9 @@ class DiscordBotLinuxMonitor:
820
820
  # Found an undesired guild, disconnect
821
821
  logging.info(msg=f"Bot '{self.bot.user}' is connected to the following UNDESIRED guild: '{guild.name}' (id: '{guild.id}'), IGNORING THIS GUILD.")
822
822
 
823
- # Sync the bot's commands globally
824
- if self.force_sync_on_startup:
825
- await self._force_sync()
823
+ # Sync the bot's commands globally (once, after all guilds are checked)
824
+ if self.force_sync_on_startup:
825
+ await self._force_sync()
826
826
 
827
827
  # Setup periodic channel cleanup task
828
828
  await self._setup_periodic_cleanup_task()
@@ -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.0",
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",
@@ -36,7 +36,7 @@ setup(
36
36
  keywords='discord bot warning info linux monitor monitoring server service port ping ssl certificate disk folder cpu ram swap usage ip connection',
37
37
  platforms='Linux',
38
38
  install_requires=[
39
- "linuxmonitor~=1.5.12", # follows the {MAJOR}.{MINOR}.x version range (because LinuxMonitor and DiscordBotLinuxMonitor are tightly coupled and should have same major and minor version)
39
+ "linuxmonitor~=1.7.0", # follows the {MAJOR}.{MINOR}.x version range (because LinuxMonitor and DiscordBotLinuxMonitor are tightly coupled and should have same major and minor version)
40
40
  "discord.py",
41
41
  "typing",
42
42
  "asyncio",