@@ -35,21 +35,24 @@ async def component_teardown(self) -> None:
3535 self .check_emotes .cancel ()
3636 await super ().component_teardown ()
3737
38- async def send_error_embed (self , emote : str , service : str , colour : int ) -> None :
38+ async def send_error_embed (self , emotes_to_send : list [ str ] , service : str , colour : int ) -> None :
3939 """Helper function to send a ping to Aluerie that something is wrong with emote services."""
4040 content = self .bot .error_ping
4141 embed = Embed (
4242 title = f"Problem with { service } emotes" ,
43- description = f"Looks like emote `{ emote } ` is no longer present in the channel." ,
43+ description = (
44+ "Looks like the following emote(-s) are no longer present in the channel.\n "
45+ f"```\n { ', ' .join (emotes_to_send )} ```"
46+ ),
4447 colour = colour ,
45- ).set_footer (text = "but it was previously used for @IreBot emotes" )
48+ ).set_footer (text = "but it was previously used for @IrenesBot emotes" )
4649 await self .bot .error_webhook .send (content = content , embed = embed )
4750
4851 async def cross_check_emotes (self , api_emotes : list [str ], bot_emotes : type [StrEnum ], colour : int ) -> None :
4952 """Cross check between emote list in `utils.const` and list from 3rd party emote service API."""
50- for emote in bot_emotes :
51- if emote not in api_emotes :
52- await self .send_error_embed (emote , bot_emotes .__name__ , colour )
53+ emotes_to_send : list [ str ] = [ e for e in bot_emotes if e not in api_emotes ]
54+ if emotes_to_send :
55+ await self .send_error_embed (emotes_to_send , bot_emotes .__name__ , colour )
5356
5457 @ireloop (time = [datetime .time (hour = 5 , minute = 59 )])
5558 async def check_emotes (self ) -> None :
0 commit comments