Skip to content

Commit

Permalink
add delete message fun
Browse files Browse the repository at this point in the history
  • Loading branch information
rtk-rnjn committed Sep 9, 2023
1 parent 55dbd6e commit 8a4a502
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cogs/reminder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ async def notify_reminder_msg(self, ctx: Context, *, timestamp: int | float) ->
)
embed = discord.Embed(description=_id, color=discord.Color.blurple())
try:
await ctx.author.send(msg, embed=embed, view=ctx.send_view())
notify_message = await ctx.author.send(msg, embed=embed, view=ctx.send_view())
await self.bot.wait_and_delete(message=notify_message, timestamp=timestamp)
await ctx.tick()
except discord.Forbidden:
await ctx.reply(msg, embed=embed)
Expand Down
2 changes: 1 addition & 1 deletion core/Parrot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ async def wait_and_delete(
self,
*,
delay: int | None = None,
timestamp: int | None = None,
timestamp: float | None = None,
channel_id: int | None = None,
message_id: int | None = None,
message: discord.Message | None = None,
Expand Down

0 comments on commit 8a4a502

Please sign in to comment.