hitomi/dice/__init__.py

16 lines
424 B
Python
Raw Normal View History

2018-01-08 10:21:30 -06:00
"""Roll dice and do other randomization type operations."""
from bot import hitomi
from dice import lib
@hitomi.command()
async def choose(*choices: str):
"""Randomly select one item from multiple choices."""
await hitomi.say(lib.choose(*choices))
@hitomi.command()
async def roll(*, roll_str: str):
"""Provided a dice string, roll the dice and return the result."""
await hitomi.say(lib.roll(roll_str))