1313from bot .converters import Duration , DurationDelta
1414from bot .log import get_logger
1515from bot .utils import time
16- from bot .utils .time import format_relative , humanize_delta
1716
1817log = get_logger (__name__ )
1918
@@ -57,7 +56,7 @@ async def get_slowmode(self, ctx: Context, channel: MessageHolder) -> None:
5756 if cached_data is not None :
5857 original_delay , expiration_time = cached_data .partition (", " )
5958 humanized_original_delay = time .humanize_delta (seconds = int (original_delay ))
60- expiration_timestamp = format_relative (expiration_time )
59+ expiration_timestamp = time . format_relative (expiration_time )
6160 await ctx .send (
6261 f"The slowmode delay for { channel .mention } is { humanized_delay } "
6362 f" and will revert to { humanized_original_delay } { expiration_timestamp } ."
@@ -104,7 +103,7 @@ async def set_slowmode(
104103 return
105104
106105 if expiry is not None :
107- expiration_timestamp = format_relative (expiry )
106+ expiration_timestamp = time . format_relative (expiry )
108107
109108 # Only cache the original slowmode delay if there is not already an ongoing temporary slowmode.
110109 if not await self .slowmode_cache .contains (channel .id ):
@@ -114,12 +113,12 @@ async def set_slowmode(
114113 delay_to_cache = cached_data .split (", " )[0 ]
115114 self .scheduler .cancel (channel .id )
116115 await self .slowmode_cache .set (channel .id , f"{ delay_to_cache } , { expiry } " )
117- humanized_original_delay = humanize_delta (seconds = int (delay_to_cache ))
116+ humanized_original_delay = time . humanize_delta (seconds = int (delay_to_cache ))
118117
119118 self .scheduler .schedule_at (expiry , channel .id , self ._revert_slowmode (channel .id ))
120119 log .info (
121120 f"{ ctx .author } set the slowmode delay for #{ channel } to { humanized_delay } "
122- f" which will revert to { humanized_original_delay } in { humanize_delta (expiry )} ."
121+ f" which will revert to { humanized_original_delay } in { time . humanize_delta (expiry )} ."
123122 )
124123 await channel .edit (slowmode_delay = slowmode_delay )
125124 await ctx .send (
0 commit comments