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()