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))
|
2018-01-08 12:40:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
@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))
|