File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 32
32
def str_to_timedelta (
33
33
duration : str
34
34
) -> Dict [str , Union [timedelta , str , None ]]:
35
- time_split = TIME_SPLIT .split (argument )
35
+ time_split = TIME_SPLIT .split (duration )
36
36
result : Dict [str , Union [timedelta , str , None ]] = {}
37
37
if time_split :
38
38
maybe_time = time_split [- 1 ]
39
39
else :
40
- maybe_time = argument
40
+ maybe_time = duration
41
41
42
42
time_data = {}
43
43
for time in TIME_RE .finditer (maybe_time ):
44
- argument = argument .replace (time [0 ], "" )
44
+ duration = duration .replace (time [0 ], "" )
45
45
for k , v in time .groupdict ().items ():
46
46
if v :
47
47
time_data [k ] = int (v )
@@ -52,5 +52,5 @@ def str_to_timedelta(
52
52
raise commands .BadArgument (
53
53
_ ("The time provided is too long; use a more reasonable time." )
54
54
)
55
- result ["reason" ] = argument .strip ()
55
+ result ["reason" ] = duration .strip ()
56
56
return result
You can’t perform that action at this time.
0 commit comments