@@ -142,6 +142,7 @@ async def slash_repeat(command: Command, app: SirBot):
142142 method_type , message = get_slash_repeat_messages (slack_id , channel_id , command ['text' ])
143143 await slack .query (method_type , message )
144144
145+
145146async def slash_roll (command : Command , app : SirBot ):
146147 """
147148 Sends text supplied with the /report command to the moderators channel along
@@ -153,7 +154,7 @@ async def slash_roll(command: Command, app: SirBot):
153154
154155 slack = app ["plugins" ]["slack" ].api
155156
156- #parse the type of die and number to roll
157+ # parse the type of die and number to roll
157158 try :
158159 text = text .lower ()
159160 numdice , typedice = text .split ('d' )
@@ -165,13 +166,13 @@ async def slash_roll(command: Command, app: SirBot):
165166 raise ValueError
166167 except ValueError :
167168 logger .debug ("invalid input to roll: %s" , text )
168- await slack .query (methods .CHAT_POST_EPHEMERAL ,
169+ await slack .query (methods .CHAT_POST_EPHEMERAL ,
169170 {'user' : slack_id , 'channel' : channel_id ,
170171 'text' : "Sorry, I didn't understand your input. Should be XDYY where X is the number of dice, and YY is the number of sides" })
171172 return
172173 dice = []
173- for _ in range (0 ,numdice ):
174- dice .append (random .randint (1 ,typedice + 1 ))
174+ for _ in range (0 , numdice ):
175+ dice .append (random .randint (1 , typedice + 1 ))
175176
176- message = f'<@{ slack_id } > Rolled { numdice } D{ typedice } : { dice } '
177+ message = f'<@{ slack_id } > Rolled { numdice } D{ typedice } : { dice } '
177178 await slack .query (methods .CHAT_POST_MESSAGE , {'channel' : channel_id , 'text' : message })
0 commit comments