[General] Fix lmgtfy with '+' in search (#1991)

This commit is contained in:
Redjumpman 2018-08-09 23:41:23 -05:00 committed by Toby Harradine
parent 652ceba845
commit 06f986b92e

View File

@ -163,7 +163,9 @@ class General:
@commands.command() @commands.command()
async def lmgtfy(self, ctx, *, search_terms: str): async def lmgtfy(self, ctx, *, search_terms: str):
"""Creates a lmgtfy link""" """Creates a lmgtfy link"""
search_terms = escape(search_terms.replace(" ", "+"), mass_mentions=True) search_terms = escape(
search_terms.replace("+", "%2B").replace(" ", "+"), mass_mentions=True
)
await ctx.send("https://lmgtfy.com/?q={}".format(search_terms)) await ctx.send("https://lmgtfy.com/?q={}".format(search_terms))
@commands.command(hidden=True) @commands.command(hidden=True)