Skip to content

Commit 10f5765

Browse files
committed
Remove humanize_timedelta usage
1 parent 475399f commit 10f5765

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

forward/forward.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import discord
44
import uuid
55
from .converters import MuteTime
6-
from redbot.core.utils.chat_formatting import humanize_timedelta
76
from datetime import datetime, timedelta, timezone
87

98
from typing import Optional
@@ -253,9 +252,9 @@ async def tblock(self, ctx, user: discord.Member, time: Optional[MuteTime] = Non
253252
if userid not in blocked:
254253
duration = time.get("duration") if time else MuteTime("5d").get("duration")
255254
blocked[userid] = (datetime.now(timezone.utc) + duration).timestamp() # until
256-
await ctx.maybe_send_embed("Blocked <@{id}> from send messages to the bot until {until}.".format(id=userid, until=humanize_timedelta(timedelta=datetime.fromtimestamp(blocked[userid]))))
255+
await ctx.maybe_send_embed("Blocked <@{id}> from send messages to the bot until {until}.".format(id=userid, until=datetime.fromtimestamp(blocked[userid])))
257256
else:
258-
await ctx.maybe_send_embed("This user is already blocked until {}.".format(humanize_timedelta(timedelta=datetime.fromtimestamp(blocked[userid]))))
257+
await ctx.maybe_send_embed("This user is already blocked until {}.".format(until=datetime.fromtimestamp(blocked[userid])))
259258

260259
@commands.command()
261260
@commands.guild_only()
@@ -280,7 +279,7 @@ async def tcheckblock(self, ctx, user: discord.Member):
280279
async with self.config.blocked() as blocked:
281280
userid = str(user.id)
282281
if userid in blocked:
283-
await ctx.maybe_send_embed("User <@{id}> is blocked until.".format(id=userid, until=humanize_timedelta(timedelta=datetime.fromtimestamp(blocked[userid]))))
282+
await ctx.maybe_send_embed("User <@{id}> is blocked until.".format(id=userid, until=datetime.fromtimestamp(blocked[userid])))
284283
else:
285284
await ctx.maybe_send_embed("This user is not blocked.")
286285

0 commit comments

Comments
 (0)