Skip to content

Commit 08699d6

Browse files
committed
Update MuteTime usage
1 parent 8fa9863 commit 08699d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

forward/converters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class MuteTime(Converter):
3737
"""
3838

3939
async def convert(
40-
self, ctx: commands.Context, argument: str
40+
self, duration: str
4141
) -> Dict[str, Union[timedelta, str, None]]:
4242
time_split = TIME_SPLIT.split(argument)
4343
result: Dict[str, Union[timedelta, str, None]] = {}

forward/forward.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ async def tblock(self, ctx, user: discord.Member, time: Optional[MuteTime] = Non
276276
async with self.config.blocked() as blocked:
277277
userid = str(user.id)
278278
if userid not in blocked:
279-
duration = time.get("duration") if time else MuteTime().convert("5d").get("duration")
279+
duration = time.get("duration") if time else MuteTime().convert(duration="5d").get("duration")
280280
blocked[userid] = (datetime.now(timezone.utc) + duration).timestamp() # until
281281
await ctx.maybe_send_embed("Blocked <@{id}> from send messages to the bot until {until}.".format(id=userid, until=datetime.fromtimestamp(blocked[userid])))
282282
else:

0 commit comments

Comments
 (0)