DiscordBotLinuxMonitor 1.6.7__tar.gz → 1.6.8__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.
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/DiscordBotLinuxMonitor.egg-info/PKG-INFO +2 -2
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/DiscordBotLinuxMonitor.egg-info/requires.txt +1 -1
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/PKG-INFO +2 -2
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/discordbotlinuxmonitor/__main__.py +2 -0
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/discordbotlinuxmonitor/discordbotlinuxmonitor.py +18 -1
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/setup.py +2 -2
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/DiscordBotLinuxMonitor.egg-info/SOURCES.txt +0 -0
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/DiscordBotLinuxMonitor.egg-info/dependency_links.txt +0 -0
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/DiscordBotLinuxMonitor.egg-info/top_level.txt +0 -0
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/LICENSE.md +0 -0
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/README.md +0 -0
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/discordbotlinuxmonitor/__init__.py +0 -0
- {discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: DiscordBotLinuxMonitor
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.8
|
|
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.
|
|
25
|
+
Requires-Dist: linuxmonitor~=1.5.12
|
|
26
26
|
Requires-Dist: discord.py
|
|
27
27
|
Requires-Dist: typing
|
|
28
28
|
Requires-Dist: asyncio
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: DiscordBotLinuxMonitor
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.8
|
|
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.
|
|
25
|
+
Requires-Dist: linuxmonitor~=1.5.12
|
|
26
26
|
Requires-Dist: discord.py
|
|
27
27
|
Requires-Dist: typing
|
|
28
28
|
Requires-Dist: asyncio
|
{discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/discordbotlinuxmonitor/__main__.py
RENAMED
|
@@ -100,10 +100,12 @@ def main() -> None:
|
|
|
100
100
|
await discord_bot_linux_monitor.restart_all(interaction)
|
|
101
101
|
|
|
102
102
|
@discord_bot.tree.command(name="restart_service", description="🚀 Restart a service 🚀")
|
|
103
|
+
@app_commands.autocomplete(service_name=discord_bot_linux_monitor.autocomplete_service_name)
|
|
103
104
|
async def restart_service(interaction: discord.Interaction, service_name: str) -> None: # type: ignore
|
|
104
105
|
await discord_bot_linux_monitor.restart_service(interaction, service_name)
|
|
105
106
|
|
|
106
107
|
@discord_bot.tree.command(name="stop_service", description="🚫 Stop a service 🚫")
|
|
108
|
+
@app_commands.autocomplete(service_name=discord_bot_linux_monitor.autocomplete_service_name)
|
|
107
109
|
async def stop_service(interaction: discord.Interaction, service_name: str) -> None: # type: ignore
|
|
108
110
|
await discord_bot_linux_monitor.stop_service(interaction, service_name)
|
|
109
111
|
|
|
@@ -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.6.
|
|
36
|
+
__version__ = "1.6.8 (2026/08/29)"
|
|
37
37
|
__status__ = "Usable for any Linux project"
|
|
38
38
|
|
|
39
39
|
# pyright: reportMissingTypeStubs=false
|
|
@@ -1209,6 +1209,23 @@ class DiscordBotLinuxMonitor:
|
|
|
1209
1209
|
logging.error(msg=f"Error while building command autocomplete: {e}")
|
|
1210
1210
|
return []
|
|
1211
1211
|
|
|
1212
|
+
async def autocomplete_service_name(self, interaction: discord.Interaction, current: str) -> List["app_commands.Choice[str]"]:
|
|
1213
|
+
# Suggest the configured service names so the user picks from a list instead of typing them.
|
|
1214
|
+
try:
|
|
1215
|
+
is_private: bool = self._is_private_channel(channel=interaction.channel) # type: ignore
|
|
1216
|
+
current_lower: str = current.lower()
|
|
1217
|
+
choices: List["app_commands.Choice[str]"] = []
|
|
1218
|
+
for service_name, display_name in self.monitoring.get_service_names(is_private=is_private):
|
|
1219
|
+
if current_lower == "" or current_lower in service_name.lower() or current_lower in display_name.lower():
|
|
1220
|
+
label: str = f"{service_name} — {display_name}"
|
|
1221
|
+
choices.append(app_commands.Choice(name=label[:100], value=service_name))
|
|
1222
|
+
if len(choices) >= 25: # Discord limits autocomplete to 25 choices
|
|
1223
|
+
break
|
|
1224
|
+
return choices
|
|
1225
|
+
except Exception as e:
|
|
1226
|
+
logging.error(msg=f"Error while building service autocomplete: {e}")
|
|
1227
|
+
return []
|
|
1228
|
+
|
|
1212
1229
|
async def execute_command(self, interaction: discord.Interaction, command_name: str, parameters: str = "") -> None:
|
|
1213
1230
|
if not self._check_if_valid_guild(guild=interaction.guild):
|
|
1214
1231
|
return
|
|
@@ -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.6.
|
|
9
|
+
version="1.6.8",
|
|
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.
|
|
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)
|
|
40
40
|
"discord.py",
|
|
41
41
|
"typing",
|
|
42
42
|
"asyncio",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{discordbotlinuxmonitor-1.6.7 → discordbotlinuxmonitor-1.6.8}/discordbotlinuxmonitor/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|