File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,8 @@ def generate_log_context(self,
233233 mode: str - The mode used to send the message (send, edit, clear-send)
234234 }
235235 """
236+ if not (len (succeeded_ch ) + len (failed_ch )):
237+ return None
236238
237239 succeeded_ch = [{"name" : str (channel ), "id" : channel .id } for channel in succeeded_ch ]
238240 failed_ch = [{"name" : str (entry ["channel" ]), "id" : entry ["channel" ].id ,
Original file line number Diff line number Diff line change @@ -188,6 +188,8 @@ def generate_log_context(self,
188188 type: str - The type of the message, this is always VoiceMESSAGE.
189189 }
190190 """
191+ if not (len (succeeded_ch ) + len (failed_ch )):
192+ return None
191193
192194 succeeded_ch = [{"name" : str (channel ), "id" : channel .id } for channel in succeeded_ch ]
193195 failed_ch = [{"name" : str (entry ["channel" ]), "id" : entry ["channel" ].id ,
@@ -345,6 +347,7 @@ async def _send(self) -> Union[dict, None]:
345347 errored_channels .append ({"channel" :channel , "reason" : context ["reason" ]})
346348
347349 self ._update_state (errored_channels )
350+
348351 return self .generate_log_context (** _data_to_send , succeeded_ch = succeeded_channels , failed_ch = errored_channels )
349352
350353 return None
You can’t perform that action at this time.
0 commit comments