Compare commits

...

2 commits

Author SHA1 Message Date
n
186563a560 something 2025-01-31 19:47:23 -06:00
n
8c787353aa !q source 2025-01-31 19:35:15 -06:00

15
bot.py
View file

@ -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("source")):
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()