DiscordBotLinuxMonitor 1.5.1__tar.gz → 1.6.1__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.5.1 → discordbotlinuxmonitor-1.6.1}/DiscordBotLinuxMonitor.egg-info/PKG-INFO +20 -4
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/DiscordBotLinuxMonitor.egg-info/requires.txt +1 -1
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/PKG-INFO +20 -4
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/README.md +4 -1
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/discordbotlinuxmonitor/__main__.py +3 -3
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/discordbotlinuxmonitor/discordbotlinuxmonitor.py +4 -4
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/setup.py +2 -2
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/DiscordBotLinuxMonitor.egg-info/SOURCES.txt +0 -0
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/DiscordBotLinuxMonitor.egg-info/dependency_links.txt +0 -0
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/DiscordBotLinuxMonitor.egg-info/top_level.txt +0 -0
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/LICENSE.md +0 -0
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/discordbotlinuxmonitor/__init__.py +0 -0
- {discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: DiscordBotLinuxMonitor
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.1
|
|
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,10 +22,23 @@ 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.8
|
|
26
26
|
Requires-Dist: discord.py
|
|
27
27
|
Requires-Dist: typing
|
|
28
28
|
Requires-Dist: asyncio
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: author-email
|
|
31
|
+
Dynamic: classifier
|
|
32
|
+
Dynamic: description
|
|
33
|
+
Dynamic: description-content-type
|
|
34
|
+
Dynamic: home-page
|
|
35
|
+
Dynamic: keywords
|
|
36
|
+
Dynamic: license
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
Dynamic: platform
|
|
39
|
+
Dynamic: requires-dist
|
|
40
|
+
Dynamic: requires-python
|
|
41
|
+
Dynamic: summary
|
|
29
42
|
|
|
30
43
|
# Discord Bot Linux Monitor (Python library)
|
|
31
44
|
[](https://pypi.org/project/DiscordBotLinuxMonitor/) [](https://github.com/QuentinCG/Discord-Bot-Linux-Monitor-Python-Library/blob/master/LICENSE.md) [](https://paypal.me/QuentinCG) [](https://pepy.tech/project/DiscordBotLinuxMonitor) [](https://pepy.tech/project/DiscordBotLinuxMonitor)
|
|
@@ -85,7 +98,7 @@ Displayed infos are not the same if you do the command in private or public chan
|
|
|
85
98
|
|
|
86
99
|
- `/list_commands`: 📋 List all available commands 📋
|
|
87
100
|
|
|
88
|
-
- `/execute_command`: 🚀 Execute a command 🚀
|
|
101
|
+
- `/execute_command {command_name} [parameters]`: 🚀 Execute a command (optional parameters, only for commands with `accept_parameters` or a `{arg1}`/`{args}` placeholder) 🚀
|
|
89
102
|
|
|
90
103
|
- `/execute_all_commands`: 🚀 Execute all commands 🚀
|
|
91
104
|
|
|
@@ -145,6 +158,9 @@ DISCORD_BOT_FOLDER="/opt/DiscordBot/"
|
|
|
145
158
|
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /sbin/reboot" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
146
159
|
# Only if this library should be able to kill a process on demand:
|
|
147
160
|
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /bin/kill" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
161
|
+
# To check last user connection
|
|
162
|
+
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /usr/bin/last" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
163
|
+
|
|
148
164
|
# Add also all processes added in your config JSON file you want the library to be able to execute
|
|
149
165
|
# Example for the existing config-example.json file:
|
|
150
166
|
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /bin/systemctl" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: DiscordBotLinuxMonitor
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.1
|
|
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,10 +22,23 @@ 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.8
|
|
26
26
|
Requires-Dist: discord.py
|
|
27
27
|
Requires-Dist: typing
|
|
28
28
|
Requires-Dist: asyncio
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: author-email
|
|
31
|
+
Dynamic: classifier
|
|
32
|
+
Dynamic: description
|
|
33
|
+
Dynamic: description-content-type
|
|
34
|
+
Dynamic: home-page
|
|
35
|
+
Dynamic: keywords
|
|
36
|
+
Dynamic: license
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
Dynamic: platform
|
|
39
|
+
Dynamic: requires-dist
|
|
40
|
+
Dynamic: requires-python
|
|
41
|
+
Dynamic: summary
|
|
29
42
|
|
|
30
43
|
# Discord Bot Linux Monitor (Python library)
|
|
31
44
|
[](https://pypi.org/project/DiscordBotLinuxMonitor/) [](https://github.com/QuentinCG/Discord-Bot-Linux-Monitor-Python-Library/blob/master/LICENSE.md) [](https://paypal.me/QuentinCG) [](https://pepy.tech/project/DiscordBotLinuxMonitor) [](https://pepy.tech/project/DiscordBotLinuxMonitor)
|
|
@@ -85,7 +98,7 @@ Displayed infos are not the same if you do the command in private or public chan
|
|
|
85
98
|
|
|
86
99
|
- `/list_commands`: 📋 List all available commands 📋
|
|
87
100
|
|
|
88
|
-
- `/execute_command`: 🚀 Execute a command 🚀
|
|
101
|
+
- `/execute_command {command_name} [parameters]`: 🚀 Execute a command (optional parameters, only for commands with `accept_parameters` or a `{arg1}`/`{args}` placeholder) 🚀
|
|
89
102
|
|
|
90
103
|
- `/execute_all_commands`: 🚀 Execute all commands 🚀
|
|
91
104
|
|
|
@@ -145,6 +158,9 @@ DISCORD_BOT_FOLDER="/opt/DiscordBot/"
|
|
|
145
158
|
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /sbin/reboot" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
146
159
|
# Only if this library should be able to kill a process on demand:
|
|
147
160
|
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /bin/kill" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
161
|
+
# To check last user connection
|
|
162
|
+
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /usr/bin/last" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
163
|
+
|
|
148
164
|
# Add also all processes added in your config JSON file you want the library to be able to execute
|
|
149
165
|
# Example for the existing config-example.json file:
|
|
150
166
|
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /bin/systemctl" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
@@ -56,7 +56,7 @@ Displayed infos are not the same if you do the command in private or public chan
|
|
|
56
56
|
|
|
57
57
|
- `/list_commands`: 📋 List all available commands 📋
|
|
58
58
|
|
|
59
|
-
- `/execute_command`: 🚀 Execute a command 🚀
|
|
59
|
+
- `/execute_command {command_name} [parameters]`: 🚀 Execute a command (optional parameters, only for commands with `accept_parameters` or a `{arg1}`/`{args}` placeholder) 🚀
|
|
60
60
|
|
|
61
61
|
- `/execute_all_commands`: 🚀 Execute all commands 🚀
|
|
62
62
|
|
|
@@ -116,6 +116,9 @@ DISCORD_BOT_FOLDER="/opt/DiscordBot/"
|
|
|
116
116
|
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /sbin/reboot" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
117
117
|
# Only if this library should be able to kill a process on demand:
|
|
118
118
|
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /bin/kill" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
119
|
+
# To check last user connection
|
|
120
|
+
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /usr/bin/last" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
|
121
|
+
|
|
119
122
|
# Add also all processes added in your config JSON file you want the library to be able to execute
|
|
120
123
|
# Example for the existing config-example.json file:
|
|
121
124
|
echo "$DISCORD_BOT_SERVICE_USER ALL=(ALL) NOPASSWD: /bin/systemctl" >> /etc/sudoers.d/$DISCORD_BOT_SERVICE_USER
|
{discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/discordbotlinuxmonitor/__main__.py
RENAMED
|
@@ -126,9 +126,9 @@ def main() -> None:
|
|
|
126
126
|
async def list_commands(interaction: discord.Interaction) -> None: # type: ignore
|
|
127
127
|
await discord_bot_linux_monitor.list_commands(interaction)
|
|
128
128
|
|
|
129
|
-
@discord_bot.tree.command(name="execute_command", description="🚀 Execute a command 🚀")
|
|
130
|
-
async def execute_command(interaction: discord.Interaction, command_name: str) -> None: # type: ignore
|
|
131
|
-
await discord_bot_linux_monitor.execute_command(interaction, command_name=command_name)
|
|
129
|
+
@discord_bot.tree.command(name="execute_command", description="🚀 Execute a command (optional parameters) 🚀")
|
|
130
|
+
async def execute_command(interaction: discord.Interaction, command_name: str, parameters: str = "") -> None: # type: ignore
|
|
131
|
+
await discord_bot_linux_monitor.execute_command(interaction, command_name=command_name, parameters=parameters)
|
|
132
132
|
|
|
133
133
|
@discord_bot.tree.command(name="execute_all_commands", description="🚀 Execute all commands 🚀")
|
|
134
134
|
async def execute_all_commands(interaction: discord.Interaction) -> None: # type: ignore
|
|
@@ -31,9 +31,9 @@ Non exhaustive list of features (available by using it in shell or in python scr
|
|
|
31
31
|
__author__ = 'Quentin Comte-Gaz'
|
|
32
32
|
__email__ = "quentin@comte-gaz.com"
|
|
33
33
|
__license__ = "MIT License"
|
|
34
|
-
__copyright__ = "Copyright Quentin Comte-Gaz (
|
|
34
|
+
__copyright__ = "Copyright Quentin Comte-Gaz (2026)"
|
|
35
35
|
__python_version__ = "3.+"
|
|
36
|
-
__version__ = "1.
|
|
36
|
+
__version__ = "1.6.1 (2026/08/22)"
|
|
37
37
|
__status__ = "Usable for any Linux project"
|
|
38
38
|
|
|
39
39
|
# pyright: reportMissingTypeStubs=false
|
|
@@ -805,7 +805,7 @@ class DiscordBotLinuxMonitor:
|
|
|
805
805
|
await self._interaction_followup_send_no_limit(interaction=interaction, msg=out_msg)
|
|
806
806
|
|
|
807
807
|
|
|
808
|
-
async def execute_command(self, interaction: discord.Interaction, command_name: str) -> None:
|
|
808
|
+
async def execute_command(self, interaction: discord.Interaction, command_name: str, parameters: str = "") -> None:
|
|
809
809
|
if not self._check_if_valid_guild(guild=interaction.guild):
|
|
810
810
|
return
|
|
811
811
|
if not (await self._is_bot_channel_interaction(interaction=interaction, send_message_if_not_bot=True)):
|
|
@@ -817,7 +817,7 @@ class DiscordBotLinuxMonitor:
|
|
|
817
817
|
try:
|
|
818
818
|
is_private: bool = self._is_private_channel(channel=interaction.channel) # type: ignore
|
|
819
819
|
# Exécuter la commande demandée
|
|
820
|
-
out_msg: str = await self.monitoring.execute_command(is_private=is_private, command_name=command_name)
|
|
820
|
+
out_msg: str = await self.monitoring.execute_command(is_private=is_private, command_name=command_name, parameters=parameters)
|
|
821
821
|
|
|
822
822
|
# Répondre à l'utilisateur
|
|
823
823
|
await self._interaction_followup_send_no_limit(interaction=interaction, msg=out_msg)
|
|
@@ -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.
|
|
9
|
+
version="1.6.1",
|
|
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.8", # 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
|
{discordbotlinuxmonitor-1.5.1 → discordbotlinuxmonitor-1.6.1}/discordbotlinuxmonitor/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|