How to use the tavern.tavern_models.TavernLog function in tavern

To help you get started, we’ve selected a few tavern examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Arctem / arcbot / tavern / logs.py View on Github external
def hero_broke_tab(hero, player):
    return TavernLog(text="{hero} is broke and skipped out without paying their tab!".format(hero=hero),
                     user=player,
                     time=datetime.now())
github Arctem / arcbot / tavern / logs.py View on Github external
def hero_healed(hero, s=None):
    return TavernLog(text="{hero} has recovered from their wounds!".format(hero=hero),
                     time=datetime.now())
github Arctem / arcbot / tavern / logs.py View on Github external
def tavern_got_money(tavern, money):
    return TavernLog(text="You got {money} gold. You now have {total} gold.".format(money=money, total=tavern.money),
                     user=tavern.owner,
                     time=datetime.now())
github Arctem / arcbot / tavern / logs.py View on Github external
def adventure_failed(hero, dungeon, tavern,  money):
    return TavernLog(text="{hero} has failed {tavern}'s quest to {dungeon}, leaving {money} gold behind."
                     .format(hero=hero, tavern=tavern, dungeon=dungeon, money=money),
                     time=datetime.now())
github Arctem / arcbot / tavern / logs.py View on Github external
def dungeon_discovered(dungeon):
    return TavernLog(text="The entrance to {} has been found!".format(dungeon),
                     time=datetime.now())
github Arctem / arcbot / tavern / logs.py View on Github external
def hero_leveled_up(hero, level, s=None):
    return TavernLog(text="{hero} has reached level {level}!".format(hero=hero, level=level),
                     time=datetime.now())
github Arctem / arcbot / tavern / logs.py View on Github external
def hero_short_on_tab(hero, total, paid, player):
    return TavernLog(text="{hero} couldn't cover their full tab of {total} gold so only paid {paid}.".format(hero=hero, total=total, paid=paid),
                     user=player,
                     time=datetime.now())
github Arctem / arcbot / tavern / logs.py View on Github external
def hero_looted_monster(adventure, monster, loot, player=None):
    return TavernLog(text="{hero} has defeated {monster} on {floor} and looted {loot} gold!"
                     .format(hero=adventure.hero, monster=monster, floor=adventure.floor, loot=loot),
                     user=player,
                     time=datetime.now())
github Arctem / arcbot / tavern / logs.py View on Github external
def adventure_ended(hero, dungeon, tavern, money):
    return TavernLog(text="{hero} has returned from {dungeon}, bringing back {money} gold for themselves and {tavern}."
                     .format(hero=hero, tavern=tavern, dungeon=dungeon, money=money),
                     time=datetime.now())
github Arctem / arcbot / tavern / logs.py View on Github external
def adventure_reached_floor(adventure):
    return TavernLog(text="{hero} has reached floor {floor_num} in {dungeon}."
                     .format(hero=adventure.hero, floor_num=adventure.floor.number, dungeon=adventure.dungeon),
                     user=adventure.employer.owner,
                     time=datetime.now())