mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[General] fixed [p]lmgtfy when search contains '+' (#1868)
A plus in an equation is interpreted as a space by https://lmgtfy.com which breaks the equation. Fixed by escaping plus characters in the search terms.
This commit is contained in:
parent
e19328188b
commit
15bf5c5e1f
@ -154,7 +154,7 @@ class General:
|
|||||||
@commands.command()
|
@commands.command()
|
||||||
async def lmgtfy(self, *, search_terms : str):
|
async def lmgtfy(self, *, search_terms : str):
|
||||||
"""Creates a lmgtfy link"""
|
"""Creates a lmgtfy link"""
|
||||||
search_terms = escape_mass_mentions(search_terms.replace(" ", "+"))
|
search_terms = escape_mass_mentions(search_terms.replace("+","%2B").replace(" ", "+"))
|
||||||
await self.bot.say("https://lmgtfy.com/?q={}".format(search_terms))
|
await self.bot.say("https://lmgtfy.com/?q={}".format(search_terms))
|
||||||
|
|
||||||
@commands.command(no_pm=True, hidden=True)
|
@commands.command(no_pm=True, hidden=True)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user