mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-04-02 21:45:40 +00:00
29 lines
806 B
Python
29 lines
806 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Ping command for the MeshCore Bot
|
|
Handles the 'ping' keyword response
|
|
"""
|
|
|
|
from .base_command import BaseCommand
|
|
from ..models import MeshMessage
|
|
|
|
|
|
class PingCommand(BaseCommand):
|
|
"""Handles the ping command"""
|
|
|
|
# Plugin metadata
|
|
name = "ping"
|
|
keywords = ['ping']
|
|
description = "Responds to 'ping' with 'Pong!'"
|
|
category = "basic"
|
|
|
|
def get_help_text(self) -> str:
|
|
return self.description
|
|
|
|
async def execute(self, message: MeshMessage) -> bool:
|
|
"""Execute the ping command"""
|
|
# The ping command is handled by keyword matching in the command manager
|
|
# This is just a placeholder for future functionality
|
|
self.logger.debug("Ping command executed (handled by keyword matching)")
|
|
return True
|