diff --git a/cogs/ShiftLogging.py b/cogs/ShiftLogging.py index d0338e49..f8f00912 100644 --- a/cogs/ShiftLogging.py +++ b/cogs/ShiftLogging.py @@ -319,9 +319,10 @@ async def duty_manage(self, ctx, *, type: str = "Default"): ) shift_types = settings.get('shift_types', {}).get('types', []) + msg = None if shift_types: if type.lower() not in [t['name'].lower() for t in shift_types]: - await ctx.send( + msg = await ctx.send( embed=discord.Embed( title="Incorrect Shift Type", description="The shift type provided is not valid.", @@ -454,7 +455,11 @@ async def duty_manage(self, ctx, *, type: str = "Default"): starting_container=contained_document ) - view.message = await ctx.send(embed=embed, view=view) + if not msg: + view.message = await ctx.send(embed=embed, view=view) + else: + await msg.edit(embed=embed, view=view) + view.message = msg @duty.command( diff --git a/events/on_message.py b/events/on_message.py index 4084b287..8a34d2b9 100644 --- a/events/on_message.py +++ b/events/on_message.py @@ -213,7 +213,7 @@ async def on_message(self, message: discord.Message): if mention.top_role > role or mention.top_role == role: embed = discord.Embed( title=f"Do not ping {role.name} or above!", - color=discord.Color.red(), + color=BLANK_COLOR, description=f"Do not ping {role.name} or above!\nIt is a violation of the rules, and you will be punished if you continue.", ) try: @@ -224,7 +224,7 @@ async def on_message(self, message: discord.Message): embed.set_image( url="https://i.imgur.com/pXesTnm.gif" ) - except discord.NotFound: + except AttributeError: pass embed.set_footer(