pull/29/head
Mallory Hancock 2018-02-06 16:39:50 -08:00
parent 8adff14dbb
commit 2d337313f2
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ def build_output(rolls, modifier):
@pinhook.plugin.register('!roll') @pinhook.plugin.register('!roll')
def roll(msg): def roll(msg):
matches = dicepatern.match(msg.arg) matches = dicepattern.match(msg.arg)
if matches: if matches:
msg.logger.info('Valid dice roll: {}'.format(msg.arg)) msg.logger.info('Valid dice roll: {}'.format(msg.arg))
rolls = [random.randrange(1, int(matches.group('sides'))+1) for i in range(int(matches.group('amount')))] rolls = [random.randrange(1, int(matches.group('sides'))+1) for i in range(int(matches.group('amount')))]

View File

@ -19,7 +19,7 @@ def build_output(rolls, modifier):
@pinhook.plugin.register('!roll') @pinhook.plugin.register('!roll')
def roll(msg): def roll(msg):
matches = dicepatern.match(msg.arg) matches = dicepattern.match(msg.arg)
if matches: if matches:
msg.logger.info('Valid dice roll: {}'.format(msg.arg)) msg.logger.info('Valid dice roll: {}'.format(msg.arg))
rolls = [random.randrange(1, int(matches.group('sides'))+1) for i in range(int(matches.group('amount')))] rolls = [random.randrange(1, int(matches.group('sides'))+1) for i in range(int(matches.group('amount')))]