示例#1
0
	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)
示例#2
0
	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)
示例#3
0
    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)