diff options
author | Thomas Voss <57815710+Mango0x45@users.noreply.github.com> | 2020-07-24 08:36:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 08:36:38 +0000 |
commit | 4b0c7cb4a432d4797b9597e364ae363052aa0ea8 (patch) | |
tree | ca5cfa1548f43b276286fc2edfbdb72ad023661b /cogs | |
parent | 41526349740b6ed8e4d5564ed67934016126d7be (diff) | |
parent | 41238b3dbdec1566d9d06ae8acab9d8b0e751779 (diff) | |
download | steve-bot-4b0c7cb4a432d4797b9597e364ae363052aa0ea8.tar steve-bot-4b0c7cb4a432d4797b9597e364ae363052aa0ea8.tar.gz steve-bot-4b0c7cb4a432d4797b9597e364ae363052aa0ea8.tar.bz2 steve-bot-4b0c7cb4a432d4797b9597e364ae363052aa0ea8.tar.lz steve-bot-4b0c7cb4a432d4797b9597e364ae363052aa0ea8.tar.xz steve-bot-4b0c7cb4a432d4797b9597e364ae363052aa0ea8.tar.zst steve-bot-4b0c7cb4a432d4797b9597e364ae363052aa0ea8.zip |
Merge pull request #19 from 0ceanlight/master
fixed mention bug
Diffstat (limited to '')
-rwxr-xr-x | cogs/utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cogs/utils.py b/cogs/utils.py index bacf5e6..ab9bc42 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -118,7 +118,7 @@ class Utils(commands.Cog): return else: await ctx.send(error) - #await ctx.send(f"{ctx.message.author.display_name}, you have to wait {round(error.retry_after, 7)} seconds before using this again.") + #await ctx.send(f"{discord.utils.escape_mentions(ctx.message.author.display_name)}, you have to wait {round(error.retry_after, 7)} seconds before using this again.") @commands.command() async def findsleep(self, ctx): @@ -147,15 +147,15 @@ class Utils(commands.Cog): # Add extra comment based on number of sleepHrs if sleepHrs == 0: - await ctx.send(f"{ctx.message.author.display_name} -> your sleep is 0 hours long - nice try \:D") + await ctx.send(f"{discord.utils.escape_mentions(ctx.message.author.display_name)} -> your sleep is 0 hours long - nice try \:D") elif sleepHrs <= 5: if sleepHrs == 1: s = '' else: s = 's' - await ctx.send(f"{ctx.message.author.display_name} -> your sleep is {sleepHrs} hour{s} long - {lessSleepMsg[randint(0, len(lessSleepMsg) - 1)]}") + await ctx.send(f"{discord.utils.escape_mentions(ctx.message.author.display_name)} -> your sleep is {sleepHrs} hour{s} long - {lessSleepMsg[randint(0, len(lessSleepMsg) - 1)]}") else: - await ctx.send(f"{ctx.message.author.display_name} -> your sleep is {sleepHrs} hours long - {moreSleepMsg[randint(0, len(moreSleepMsg) - 1)]}") + await ctx.send(f"{discord.utils.escape_mentions(ctx.message.author.display_name)} -> your sleep is {sleepHrs} hours long - {moreSleepMsg[randint(0, len(moreSleepMsg) - 1)]}") @commands.Cog.listener() async def on_member_join(self, member): @@ -234,7 +234,7 @@ class Utils(commands.Cog): async def leaderboard_handler(self,ctx,error): if isinstance(error, commands.CommandOnCooldown): #return - await ctx.send(f"{ctx.message.author.display_name}, you have to wait {round(error.retry_after, 2)} seconds before using this again.") + await ctx.send(f"{discord.utils.escape_mentions(ctx.message.author.display_name)}, you have to wait {round(error.retry_after, 2)} seconds before using this again.") @commands.cooldown(1, 60, commands.BucketType.guild) @commands.command() |