async def duck(self, ctx, *, query = None): """Duck Duck... GOOSE.""" if query == None: msg = 'You need a topic for me to DuckDuckGo.' await ctx.channel.send(msg) return lmgtfy = "https://lmddgtfy.net/?q={}".format(quote(query)) lmgtfyT = TinyURL.tiny_url(lmgtfy) msg = '*{}*, you can find your answers here:\n\n{}'.format(DisplayName.name(ctx.message.author), lmgtfyT) # Say message await ctx.channel.send(msg)
async def bing(self, ctx, *, query = None): """Get some uh... more searching done.""" if query == None: msg = 'You need a topic for me to Bing.' await ctx.channel.send(msg) return lmgtfy = "http://letmebingthatforyou.com/?q={}".format(quote(query)) lmgtfyT = TinyURL.tiny_url(lmgtfy) msg = '*{}*, you can find your answers here:\n\n{}'.format(DisplayName.name(ctx.message.author), lmgtfyT) # Say message await ctx.channel.send(msg)
async def google(self, ctx, *, query=None): """Get some searching done.""" if query == None: msg = 'You need a topic for me to Google.' await self.bot.send_message(ctx.message.channel, msg) return lmgtfy = "http://lmgtfy.com/?q={}".format(quote(query)) lmgtfyT = TinyURL.tiny_url(lmgtfy) msg = '*{}*, you can find your answers here:\n\n{}'.format( DisplayName.name(ctx.message.author), lmgtfyT) # Say message await self.bot.send_message(ctx.message.channel, msg)