Moved ~remindme command to FunCommands.py

pull/2/head
sgoudham 4 years ago
parent fd29cb3efe
commit af9bf67323

@ -186,6 +186,24 @@ class Fun(commands.Cog):
# Delete the message sent instantly # Delete the message sent instantly
await ctx.message.delete() await ctx.message.delete()
# ~remindme command to allow the bot to dm you to remind you of something
@commands.command(aliases=["remindme", "rm"])
async def remind_me(self, ctx, time=None, *, text):
# Grab the author and store it in "author"
author = ctx.author
# If a value for time as been given
if time:
# Sleep the thread for the amount of time specified by the user
await asyncio.sleep(float(time))
# Send message to user's dms
await author.send(text)
# else no time has been given
else:
# Instantly Send message to user's dms
await author.send(text)
def setup(bot): def setup(bot):
bot.add_cog(Fun(bot)) bot.add_cog(Fun(bot))

Loading…
Cancel
Save