From 79b55441328a359caba5c1b1e787367c6866d577 Mon Sep 17 00:00:00 2001 From: Conatum Date: Sun, 15 Oct 2023 17:56:27 +0300 Subject: [PATCH] fix (voicefix): Re-initialise attachments. --- src/modules/voicefix/cog.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/voicefix/cog.py b/src/modules/voicefix/cog.py index 8a14414f..9d60d18d 100644 --- a/src/modules/voicefix/cog.py +++ b/src/modules/voicefix/cog.py @@ -91,14 +91,14 @@ class VoiceFixCog(LionCog): sent = [] linkids = self.channel_links.get(message.channel.id, ()) if linkids: - if message.attachments: - files = await prepare_attachments(message.attachments) - else: - files = [] - for linkid in linkids: for channelid in self.link_channels[linkid]: if channelid != message.channel.id: + if message.attachments: + files = await prepare_attachments(message.attachments) + else: + files = [] + hook = self.hooks[channelid] avatar = message.author.avatar or message.author.default_avatar msg = await hook.send(