maubot-syng/syngbot.py

12 lines
412 B
Python
Raw Normal View History

2022-10-13 11:35:11 +02:00
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")