@@ -128,6 +128,8 @@ async def help_command(ctx, command_name=None):
128128• `ml` - Run machine learning analysis
129129• `plot <start_date> [end_date]` - Generate weather plots for specified dates
130130• `monitor` - Monitor data collection status
131+ • `ifconfig` - Show Raspberry Pi network information
132+ • `top` - Show Raspberry Pi system status
131133• `who` - Show information about the bot
132134• `help` - Show this help message
133135• `help <command>` - Show detailed help for a specific command
@@ -146,7 +148,9 @@ async def help_command(ctx, command_name=None):
146148`@meteorix who` - Show bot information
147149`@meteorix monitor enable` - Enable data collection monitoring
148150`@meteorix monitor disable` - Disable data collection monitoring
149- `@meteorix monitor status` - Check current monitoring status"""
151+ `@meteorix monitor status` - Check current monitoring status
152+ `@meteorix ifconfig` - Show Pi network status
153+ `@meteorix top` - Show Pi system status"""
150154 await ctx .send (help_text )
151155 return
152156
@@ -165,6 +169,8 @@ async def help_command(ctx, command_name=None):
165169• `ml` - Run machine learning analysis
166170• `plot <start_date> [end_date]` - Generate weather plots for specified dates
167171• `monitor` - Monitor data collection status
172+ • `ifconfig` - Show Raspberry Pi network information
173+ • `top` - Show Raspberry Pi system status
168174• `who` - Show information about the bot
169175• `help` - Show this help message
170176• `help <command>` - Show detailed help for a specific command
@@ -203,6 +209,8 @@ async def help_command(ctx, command_name=None):
203209• `ml` - Run machine learning analysis
204210• `plot <start_date> [end_date]` - Generate weather plots for specified dates
205211• `monitor` - Monitor data collection status
212+ • `ifconfig` - Show Raspberry Pi network information
213+ • `top` - Show Raspberry Pi system status
206214• `who` - Show information about the bot
207215• `help` - Show this help message
208216• `help <command>` - Show detailed help for a specific command
@@ -221,7 +229,9 @@ async def help_command(ctx, command_name=None):
221229`@meteorix who` - Show bot information
222230`@meteorix monitor enable` - Enable data collection monitoring
223231`@meteorix monitor disable` - Disable data collection monitoring
224- `@meteorix monitor status` - Check current monitoring status"""
232+ `@meteorix monitor status` - Check current monitoring status
233+ `@meteorix ifconfig` - Show Pi network status
234+ `@meteorix top` - Show Pi system status"""
225235 await ctx .send (help_text )
226236
227237
@@ -359,6 +369,12 @@ async def ifconfig(ctx):
359369 await run_cli_command (ctx , ["ifconfig" ])
360370
361371
372+ @bot .command (name = "top" )
373+ @check_channel ()
374+ async def top (ctx ):
375+ await run_cli_command (ctx , ["top" ])
376+
377+
362378# Slash commands
363379@bot .tree .command (name = "info" , description = "Show available date range" )
364380@app_commands .describe (month = "Optional: Month to show statistics for (YYYY_MM)" )
@@ -506,12 +522,18 @@ async def monitor_slash(interaction: discord.Interaction, action: str):
506522 await interaction .response .send_message (f"```\n { output } \n ```" )
507523
508524
509- @bot .tree .command (name = "ifconfig" , description = "Show Raspberry Pi IP addresses " )
525+ @bot .tree .command (name = "ifconfig" , description = "Show Raspberry Pi network information " )
510526@app_commands .check (check_channel_slash )
511527async def ifconfig_slash (interaction : discord .Interaction ):
512528 await run_cli_command_slash (interaction , ["ifconfig" ])
513529
514530
531+ @bot .tree .command (name = "top" , description = "Show Raspberry Pi system status" )
532+ @app_commands .check (check_channel_slash )
533+ async def top_slash (interaction : discord .Interaction ):
534+ await run_cli_command_slash (interaction , ["top" ])
535+
536+
515537VALID_COMMANDS = [
516538 "info" ,
517539 "upload" ,
@@ -527,6 +549,7 @@ async def ifconfig_slash(interaction: discord.Interaction):
527549 "plot" ,
528550 "monitor" ,
529551 "ifconfig" ,
552+ "top" ,
530553]
531554
532555
@@ -545,7 +568,8 @@ def get_command_description(cmd):
545568 "spit" : "Get raw CSV data for specified dates" ,
546569 "plot" : "Create weather data plots" ,
547570 "monitor" : "Monitor data collection status" ,
548- "ifconfig" : "Show Raspberry Pi IP addresses" ,
571+ "ifconfig" : "Show Raspberry Pi network information" ,
572+ "top" : "Show Raspberry Pi system status" ,
549573 }
550574 return descriptions .get (cmd , "" )
551575
@@ -578,6 +602,8 @@ async def help_slash(interaction: discord.Interaction, command_name: str = None)
578602• `ml` - Run machine learning analysis
579603• `plot <start_date> [end_date]` - Generate weather plots for specified dates
580604• `monitor` - Monitor data collection status
605+ • `ifconfig` - Show Raspberry Pi network information
606+ • `top` - Show Raspberry Pi system status
581607• `who` - Show information about the bot
582608• `help` - Show this help message
583609• `help <command>` - Show detailed help for a specific command
@@ -605,6 +631,8 @@ async def help_slash(interaction: discord.Interaction, command_name: str = None)
605631• `ml` - Run machine learning analysis
606632• `plot <start_date> [end_date]` - Generate weather plots for specified dates
607633• `monitor` - Monitor data collection status
634+ • `ifconfig` - Show Raspberry Pi network information
635+ • `top` - Show Raspberry Pi system status
608636• `who` - Show information about the bot
609637• `help` - Show this help message
610638• `help <command>` - Show detailed help for a specific command
@@ -620,7 +648,9 @@ async def help_slash(interaction: discord.Interaction, command_name: str = None)
620648`/who` - Show bot information
621649`/monitor enable` - Enable data collection monitoring
622650`/monitor disable` - Disable data collection monitoring
623- `/monitor status` - Check current monitoring status"""
651+ `/monitor status` - Check current monitoring status
652+ `/ifconfig` - Show Pi network status
653+ `/top` - Show Pi system status"""
624654 await interaction .followup .send (help_text )
625655 return
626656
@@ -653,6 +683,8 @@ async def help_slash(interaction: discord.Interaction, command_name: str = None)
653683• `ml` - Run machine learning analysis
654684• `plot <start_date> [end_date]` - Generate weather plots for specified dates
655685• `monitor` - Monitor data collection status
686+ • `ifconfig` - Show Raspberry Pi network information
687+ • `top` - Show Raspberry Pi system status
656688• `who` - Show information about the bot
657689• `help` - Show this help message
658690• `help <command>` - Show detailed help for a specific command
@@ -669,7 +701,8 @@ async def help_slash(interaction: discord.Interaction, command_name: str = None)
669701`/monitor enable` - Enable data collection monitoring
670702`/monitor disable` - Disable data collection monitoring
671703`/monitor status` - Check current monitoring status
672- """
704+ `/ifconfig` - Show Pi network status
705+ `/top` - Show Pi system status"""
673706 await interaction .followup .send (help_text )
674707
675708
@@ -841,6 +874,8 @@ async def on_command_error(ctx, error):
841874• `ml` - Run machine learning analysis
842875• `plot <start_date> [end_date]` - Generate weather plots for specified dates
843876• `monitor` - Monitor data collection status
877+ • `ifconfig` - Show Raspberry Pi network information
878+ • `top` - Show Raspberry Pi system status
844879• `who` - Show information about the bot
845880• `help` - Show this help message
846881• `help <command>` - Show detailed help for a specific command
0 commit comments