import requests


__commands__ = '''
    hal (frog) [me] - shows a random frog tip
'''


def plugin(bot):
    def get_tips():
        result = requests.get('http://frog.tips/api/1/tips/')

        if result.status_code != 200:
            result.raise_for_status()

        return result.json()['tips']

    tips = []

    def get_tip():
        if len(tips) == 0:
            tips.extend(get_tips())

        return tips.pop()

    @bot.respond(r'frog(?: me)?')
    def frogs(response):
        try:
            tip = get_tip()
            response.send('TIP #%d: %s' % (tip['number'], tip['tip'],))
        except requests.exceptions.RequestException as e:
            response.send('ERROR: %s' % (e,))

7b23037159e026f939f2e6a222ba4445c64587dd
<mask token>

<mask token>


def plugin(bot):

    def get_tips():
        result = requests.get('http://frog.tips/api/1/tips/')
        if result.status_code != 200:
            result.raise_for_status()
        return result.json()['tips']
    tips = []

    def get_tip():
        if len(tips) == 0:
            tips.extend(get_tips())
        return tips.pop()

    @bot.respond('frog(?: me)?')
    def frogs(response):
        try:
            tip = get_tip()
            response.send('TIP #%d: %s' % (tip['number'], tip['tip']))
        except requests.exceptions.RequestException as e:
            response.send('ERROR: %s' % (e,))

<mask token>
__commands__ = """
    hal (frog) [me] - shows a random frog tip
"""


def plugin(bot):

    def get_tips():
        result = requests.get('http://frog.tips/api/1/tips/')
        if result.status_code != 200:
            result.raise_for_status()
        return result.json()['tips']
    tips = []

    def get_tip():
        if len(tips) == 0:
            tips.extend(get_tips())
        return tips.pop()

    @bot.respond('frog(?: me)?')
    def frogs(response):
        try:
            tip = get_tip()
            response.send('TIP #%d: %s' % (tip['number'], tip['tip']))
        except requests.exceptions.RequestException as e:
            response.send('ERROR: %s' % (e,))

import requests
__commands__ = """
    hal (frog) [me] - shows a random frog tip
"""


def plugin(bot):

    def get_tips():
        result = requests.get('http://frog.tips/api/1/tips/')
        if result.status_code != 200:
            result.raise_for_status()
        return result.json()['tips']
    tips = []

    def get_tip():
        if len(tips) == 0:
            tips.extend(get_tips())
        return tips.pop()

    @bot.respond('frog(?: me)?')
    def frogs(response):
        try:
            tip = get_tip()
            response.send('TIP #%d: %s' % (tip['number'], tip['tip']))
        except requests.exceptions.RequestException as e:
            response.send('ERROR: %s' % (e,))

import requests


__commands__ = '''
    hal (frog) [me] - shows a random frog tip
'''


def plugin(bot):
    def get_tips():
        result = requests.get('http://frog.tips/api/1/tips/')

        if result.status_code != 200:
            result.raise_for_status()

        return result.json()['tips']

    tips = []

    def get_tip():
        if len(tips) == 0:
            tips.extend(get_tips())

        return tips.pop()

    @bot.respond(r'frog(?: me)?')
    def frogs(response):
        try:
            tip = get_tip()
            response.send('TIP #%d: %s' % (tip['number'], tip['tip'],))
        except requests.exceptions.RequestException as e:
            response.send('ERROR: %s' % (e,))
