def reminder(self, ctx, *, when: time.UserFriendlyTime(commands.clean_content, default='something')):
"""Reminds you of something after a certain amount of time.
The input can be any direct date (e.g. YYYY-MM-DD) or a human
readable offset. Examples:
- "next thursday at 3pm do something funny"
- "do the dishes tomorrow"
- "in 3 days do the thing"
- "2d unmute someone"
Times are in UTC.
"""
timer = await self.create_timer(when.dt, 'reminder', ctx.author.id, ctx.channel.id, when.arg, connection=ctx.db)
delta = time.human_timedelta(when.dt, source=ctx.message.created_at)
await ctx.send(f"Alright {ctx.author.mention}, I'll remind you about {when.arg} in {delta}.")
评论列表
文章目录