Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
phixxy
3e98baddda start of meshtastic code 2024-06-18 11:10:38 -07:00
2 changed files with 28 additions and 1 deletions

26
cogs/meshtastic.py Normal file
View file

@ -0,0 +1,26 @@
import logging
import discord
from discord.ext import commands
import meshtastic
import meshtastic.serial_interface
class Meshtastic(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.logger = logging.getLogger("bot")
self.interface = meshtastic.serial_interface.SerialInterface()
@commands.command(
description="Meshtastic",
help="Ask the magic ball a question.",
brief="Ask the magic ball a question.",
aliases=["mesh"]
)
async def mesh(self, ctx, *args):
message = " ".join(args)
self.interface.sendText(message)
self.logger.info(f"Meshtastic command called by {ctx.author.name}")
async def setup(bot):
await bot.add_cog(Meshtastic(bot))

View file

@ -9,4 +9,5 @@ psutil
aiofiles
inky
wakeonlan
beautifulsoup4
beautifulsoup4
meshtastic