From 8c787353aa42cb9e3e7c9435ef3e3e183028770e Mon Sep 17 00:00:00 2001 From: n Date: Fri, 31 Jan 2025 19:35:15 -0600 Subject: [PATCH] !q source --- bot.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bot.py b/bot.py index 56f78ec..bd1e339 100644 --- a/bot.py +++ b/bot.py @@ -23,6 +23,7 @@ async def help_message(room, message): A work-in-progress Python rewrite of the original quotes bot, aiming for a mostly complete remake. {PREFIX} help - show this message {PREFIX} get - fetch a image from the defined instance + {PREFIX} source - send a link to the source code """) await bot.api.send_text_message(room.room_id, message) @@ -47,4 +48,18 @@ async def make_choice(room, message): await bot.api.send_text_message(room.room_id, message) +@bot.listener.on_message_event +async def help_message(room, message): + match = botLibrary.MessageMatch(room, message, bot, PREFIX) + if not (match.is_not_from_this_bot() and match.prefix() + and match.command("help")): + return + + message = (f""" + quotes-bot-python by Nyx Tutt (@n:everypizza.im) + https://git.everypizza.im/n/quotes-bot-python/ + """) + + await bot.api.send_text_message(room.room_id, message) + bot.run()