maubot-syng/syngbot.py

11 lines
412 B
Python

from maubot import Plugin, MessageEvent
from maubot.handlers import command
class SyngBot(Plugin):
@command.new("search", help="Search for a song")
async def syng(self, evt: MessageEvent):
# forward parameters to the `/query` endpoint of https://karaoke.oh14.de
results = await self.http.get("https://karaoke.oh14.de/query", params=evt.args)
await evt.respond("Syng is a bot")