From 9e09b405b23c40af164c91a37247631d1a3a04dc Mon Sep 17 00:00:00 2001 From: Twentysix Date: Mon, 30 May 2016 21:25:23 +0200 Subject: [PATCH] Refactored lmgtfy --- cogs/general.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cogs/general.py b/cogs/general.py index 2a7e6e2b6..4b3c8deb3 100644 --- a/cogs/general.py +++ b/cogs/general.py @@ -131,13 +131,10 @@ class General: self.stopwatches.pop(author.id, None) @commands.command() - async def lmgtfy(self, *text): + async def lmgtfy(self, *, search_terms : str): """Creates a lmgtfy link""" - if text == (): - await self.bot.say("lmgtfy [search terms]") - return - text = "+".join(text) - await self.bot.say("http://lmgtfy.com/?q=" + text) + search_terms = search_terms.replace(" ", "+") + await self.bot.say("http://lmgtfy.com/?q={}".format(search_terms)) @commands.command(no_pm=True, hidden=True) async def hug(self, user : discord.Member, intensity : int=1):