only attach reference message if not already known

pull/4/head
Michael Yang 2023-10-14 13:09:16 -07:00
parent 5af89811be
commit bc573dfd52
1 changed files with 9 additions and 9 deletions

View File

@ -103,7 +103,7 @@ async def on_message(message):
if reference := message.reference:
if session := load_session(message.reference):
context = session.get('context', [])
else:
reference_message = await message.channel.fetch_message(
reference.message_id)
reference_content = reference_message.content