def giphy(bot, channel, sender, args): tag = None if args: tag = " ".join(args) bot.message(channel, screensaver(tag=tag).fixed_height.url)
def test_screensaver_alias(self, giphy): giphy.return_value = giphy screensaver(tag='foo', api_key='bar', strict=False) giphy.assert_called_with(api_key='bar', strict=False) giphy.screensaver.assert_called_with(tag='foo')
async def gif(self, text: str): scr = screensaver(text, api_key='t99aoKqUEvmafLWkqBD9zb04BlNiWXPJ') await self.client.say(scr)