From 0e034d83efa7fa66617308774c9d22b3b6cd281b Mon Sep 17 00:00:00 2001 From: bobloy Date: Mon, 15 Feb 2021 10:37:32 -0500 Subject: [PATCH] Bad idea to steal these, set the empty by default instead --- fifo/task.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fifo/task.py b/fifo/task.py index cd7200d..e1b7207 100644 --- a/fifo/task.py +++ b/fifo/task.py @@ -75,8 +75,8 @@ things_for_fakemessage_to_steal = [ "_state", "id", "webhook_id", - "reactions", - "attachments", + # "reactions", + # "attachments", "embeds", "application", "activity", @@ -92,10 +92,16 @@ things_for_fakemessage_to_steal = [ "reference", ] +things_fakemessage_sets_by_default = { + "attachments": [], + "reactions": [], +} + class FakeMessage(discord.Message): def __init__(self, *args, message: discord.Message, **kwargs): d = {k: getattr(message, k, None) for k in things_for_fakemessage_to_steal} + d.update(things_fakemessage_sets_by_default) for k, v in d.items(): try: # log.debug(f"{k=} {v=}")