add kwarg to ignore exceptions to send embed coros
@@ -176,11 +176,19 @@ class VillagerBotCluster(commands.AutoShardedBot):
return self.l["en"]
- async def send_embed(self, location, message: str) -> None:
+ async def send_embed(self, location, message: str, *, ignore_exceptions: bool = False) -> None:
+ try:
await location.send(embed=discord.Embed(color=self.d.cc, description=message))
+ except Exception as e:
+ if not ignore_exceptions:
+ raise
- async def reply_embed(self, location, message: str, ping: bool = False) -> None:
+ async def reply_embed(self, location, message: str, ping: bool = False, *, ignore_exceptions: bool = False) -> None:
+ try:
await location.reply(embed=discord.Embed(color=self.d.cc, description=message), mention_author=ping)
+ except Exception as e:
+ if not ignore_exceptions:
+ raise
async def send_tip(self, ctx) -> None:
