From e3de0ef0aee15c0a75311ff16a8db112107634b7 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Thu, 18 Jun 2020 19:06:07 +0100 Subject: [PATCH] Added a message telling the user that Enso-chan has dm'ed them --- cogs/HelpCommands.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/cogs/HelpCommands.py b/cogs/HelpCommands.py index bf639743..7097b0e6 100644 --- a/cogs/HelpCommands.py +++ b/cogs/HelpCommands.py @@ -1,3 +1,4 @@ +import asyncio import datetime import discord @@ -146,6 +147,14 @@ class CustomHelp(commands.Cog): inline=True) await author.send(embed=embed) + + message = await ctx.send(helpDm()) + + # Let the user read the message for 2.5 seconds + await asyncio.sleep(10) + # Delete the message + await message.delete() + except Exception as e: print(e) @@ -252,6 +261,13 @@ class CustomHelp(commands.Cog): inline=False) await ctx.send(embed=embed) + + message = await ctx.send(helpDm()) + + # Let the user read the message for 2.5 seconds + await asyncio.sleep(10) + # Delete the message + await message.delete() except Exception as e: print(e) @@ -289,9 +305,23 @@ class CustomHelp(commands.Cog): inline=False) await author.send(embed=embed) + + message = await ctx.send(helpDm()) + + # Let the user read the message for 2.5 seconds + await asyncio.sleep(10) + # Delete the message + await message.delete() except Exception as e: print(e) +def helpDm(): + hamothyID = '<@&715412394968350756>' + + return f"I've just pinged your dms UwU! " \ + f"\nPlease ping my owner {hamothyID} for any issues/questions you have!" + + def setup(bot): bot.add_cog(CustomHelp(bot))