コード例 #1
0
ファイル: giphy.py プロジェクト: wwaites/botbot
def giphy(bot, channel, sender, args):
    tag = None
    if args:
        tag = " ".join(args)
    bot.message(channel, screensaver(tag=tag).fixed_height.url)
コード例 #2
0
ファイル: tests.py プロジェクト: zekroTJA/giphypop
    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')
コード例 #3
0
ファイル: gifs.py プロジェクト: morozoffnor/discord-bot
 async def gif(self, text: str):
     scr = screensaver(text, api_key='t99aoKqUEvmafLWkqBD9zb04BlNiWXPJ')
     await self.client.say(scr)