commit 8e9e6ceea196a50e60a9290a8726f63af989b56d Author: Christoph Stahl Date: Thu Oct 13 11:35:11 2022 +0200 Fist few lines of code diff --git a/maubot.yaml b/maubot.yaml new file mode 100644 index 0000000..751c0af --- /dev/null +++ b/maubot.yaml @@ -0,0 +1,9 @@ +maubot: 0.1.0 +id: de.k-fortytwo.syng +version: 0.2.1 +license: AGPL-3.0-or-later +modules: + - syngbot +main_class: SyngBot +dependencies: + - requests diff --git a/syngbot.py b/syngbot.py new file mode 100644 index 0000000..10701d7 --- /dev/null +++ b/syngbot.py @@ -0,0 +1,11 @@ +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")